diff --git a/.changeset/warm-hoops-enter.md b/.changeset/warm-hoops-enter.md new file mode 100644 index 00000000..61d9590d --- /dev/null +++ b/.changeset/warm-hoops-enter.md @@ -0,0 +1,5 @@ +--- +"@stakekit/widget": patch +--- + +fix(ledger): use parentAccountId if exists diff --git a/README.md b/README.md index 95727c03..7e8d639c 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,28 @@ type SettingsProps = { preferredTransactionFormat?: TransactionFormat; hideChainModal?: boolean; whitelistedValidatorAddresses?: string[]; + tokenIconMapping?: + | Record + | ((token: TokenDto) => string); + chainIconMapping?: + | Record + | ((chain: SupportedSKChains) => string); }; ``` +### Override Icons + +You can override token or chain icons in widget + +```tsx +tokenIconMapping?: + | Record + | ((token: TokenDto) => string); +chainIconMapping?: + | Record + | ((chain: SupportedSKChains) => string); +``` + After this is done, you can start using the widget. ## Style customization diff --git a/packages/widget/src/providers/ledger/ledger-connector.ts b/packages/widget/src/providers/ledger/ledger-connector.ts index fd66362e..c57e22d9 100644 --- a/packages/widget/src/providers/ledger/ledger-connector.ts +++ b/packages/widget/src/providers/ledger/ledger-connector.ts @@ -44,7 +44,9 @@ const createLedgerLiveConnector = ({ const $disabledChains = new BehaviorSubject([]); const $currentAccount = new BehaviorSubject(undefined); - const $currentAccountId = $currentAccount.pipe(map((v) => v?.id)); + const $currentAccountId = $currentAccount.pipe( + map((v) => v?.parentAccountId ?? v?.id) + ); let ledgerAccounts: Account[] = []; const $accountsOnCurrentChain = new BehaviorSubject([]); let currentChain: ChainItem | null = null;