Skip to content

Commit

Permalink
Merge pull request #6459 from blockchain/fix/swap-coinselector
Browse files Browse the repository at this point in the history
fix(swap-coinselector): filter out undefined coin accounts
  • Loading branch information
jjBlockchain authored Sep 19, 2024
2 parents dfe5e5d + c56cb29 commit d02a206
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const getData = (state: RootState, { side }: OwnProps) => {
}, {}) as unknown as { [key in CoinType]: Array<SwapAccountType> }

let filteredAccounts = Object.keys(accountsForSide).reduce((prevValue, curValue: CoinType) => {
if (!accountsForSide[curValue]) return prevValue
return prevValue.concat(accountsForSide[curValue])
}, [] as Array<SwapAccountType>)

Expand Down

0 comments on commit d02a206

Please sign in to comment.