Skip to content

Commit

Permalink
Merge pull request #12 from Venly/VENLY-8044
Browse files Browse the repository at this point in the history
task(VENLY-8044): fix null safe errors
  • Loading branch information
davidzwfu authored Dec 12, 2024
2 parents 77b8347 + 8b4d179 commit 17a74b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion connect-sdk/src/components/TokensTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function Tokens({
</div>
</td>
<td>
<span className="table-grid__subtitle">{token.balance.toFixed(6)} {token.symbol}</span>
<span className="table-grid__subtitle">{token?.balance?.toFixed(6)} {token.symbol}</span>
</td>
<td>
<span className="table-grid__subtitle">{token?.exchange?.usdBalanceValue.toFixed(2) ?? '-'}</span>
Expand Down
2 changes: 1 addition & 1 deletion connect-sdk/src/components/WalletInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function WalletInfo({
</div>
<div className="wallet-info__block">
<p className="wallet-info__label">Balance</p>
<p className="wallet-info__text">{wallet.balance?.balance.toFixed(6)} {wallet.balance?.symbol}</p>
<p className="wallet-info__text">{wallet.balance?.balance?.toFixed(6)} {wallet.balance?.symbol}</p>
</div>
</div>
</>
Expand Down
2 changes: 1 addition & 1 deletion connect-sdk/src/components/WalletsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default function Wallets() {
<span className="table-grid__subtitle">{new Date(wallet.createdAt ?? '').toLocaleDateString('en-us', { year: 'numeric', month: 'short', day: 'numeric' })}</span>
</td>
<td>
<span className="table-grid__subtitle">{wallet.balance?.balance.toFixed(6)} {wallet.balance?.symbol}</span>
<span className="table-grid__subtitle">{wallet.balance?.balance?.toFixed(6)} {wallet.balance?.symbol}</span>
</td>
<td>
<div className="table-grid__actions">
Expand Down

0 comments on commit 17a74b1

Please sign in to comment.