Skip to content

Commit

Permalink
fix: pass misc
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirvolek committed Dec 16, 2024
1 parent 61d4ae0 commit b2dab27
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions packages/blockchain-link-types/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ export interface AccountInfo {
isActive: boolean;
rewards: string;
poolId: string | null;
drep: {
drep_id: string;
hex: string;
amount: string;
active: boolean;
active_epoch: number | null;
has_script: boolean;
} | null;
};
// SOL
owner?: string; // The Solana program owning the account
Expand Down
2 changes: 1 addition & 1 deletion packages/suite/src/hooks/wallet/useCardanoStaking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const useCardanoStaking = (): CardanoStaking => {
poolId: registeredPoolId,
isActive: isStakingActive,
} = account.misc.staking;

const cardanoNetwork = account.symbol === 'ada' ? 'mainnet' : 'preview';
const { trezorPools, isFetchLoading, isFetchError, trezorDRep } =
cardanoStaking[cardanoNetwork];
const currentPool =
Expand Down
2 changes: 1 addition & 1 deletion suite-common/test-utils/src/extraDependenciesMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const mockReducer = (name: string) => (state: any, action: any) => {
export const extraDependenciesMock: ExtraDependencies = {
thunks: {
cardanoValidatePendingTxOnBlock: mockThunk('validatePendingTxOnBlock'),
cardanoFetchTrezorPools: mockThunk('fetchTrezorPools'),
cardanoFetchTrezorData: mockThunk('fetchTrezorData'),
fetchAndSaveMetadata: mockThunk('fetchAndSaveMetadata'),
initMetadata: mockThunk('initMetadata'),
addAccountMetadata: mockThunk('addAccountMetadata'),
Expand Down
1 change: 1 addition & 0 deletions suite-common/wallet-utils/src/accountUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ export const getAccountSpecific = (accountInfo: Partial<AccountInfo>, networkTyp
isActive: misc && misc.staking ? misc.staking.isActive : false,
address: misc && misc.staking ? misc.staking.address : '',
poolId: misc && misc.staking ? misc.staking.poolId : null,
drep: misc && misc.staking ? misc.staking.drep : null,
},
},
marker: undefined,
Expand Down

0 comments on commit b2dab27

Please sign in to comment.