default to zero wallet balance in swap ui
This commit is contained in:
parent
f842bb54d8
commit
0578903bb6
|
@ -208,7 +208,7 @@ const JupiterForm: FunctionComponent = () => {
|
|||
return t.account.mint.toString() === inputTokenInfo?.address
|
||||
})
|
||||
const largestTokenAccount = sortBy(walletToken, 'uiBalance').reverse()[0]
|
||||
return largestTokenAccount?.uiBalance
|
||||
return largestTokenAccount?.uiBalance || 0.0
|
||||
}
|
||||
|
||||
return 0.0
|
||||
|
@ -220,7 +220,7 @@ const JupiterForm: FunctionComponent = () => {
|
|||
return t.account.mint.toString() === outputTokenInfo?.address
|
||||
})
|
||||
const largestTokenAccount = sortBy(walletToken, 'uiBalance').reverse()[0]
|
||||
return largestTokenAccount?.uiBalance
|
||||
return largestTokenAccount?.uiBalance || 0.0
|
||||
}
|
||||
return 0.0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue