Skip to content

Commit

Permalink
Fix issue with empty ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Mar 19, 2024
1 parent b4f455a commit f74f9da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/1336.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix issue with empty ticker

- tx.body.amount.Denomination can be an empty string
4 changes: 2 additions & 2 deletions src/oasis-nexus/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const useGetRuntimeTransactions: typeof generated.useGetRuntimeTransactio
layer: runtime,
network,
ticker:
tx.body?.amount?.Denomination ?? getTokensForScope({ network, layer: runtime })[0].ticker,
tx.body?.amount?.Denomination || getTokensForScope({ network, layer: runtime })[0].ticker,
method: adjustRuntimeTransactionMethod(tx.method, tx.is_likely_native_token_transfer),
}
}),
Expand Down Expand Up @@ -259,7 +259,7 @@ export const useGetRuntimeTransactionsTxHash: typeof generated.useGetRuntimeTran
layer: runtime,
network,
ticker:
tx.body?.amount?.Denomination ?? getTokensForScope({ network, layer: runtime })[0].ticker,
tx.body?.amount?.Denomination || getTokensForScope({ network, layer: runtime })[0].ticker,
method: adjustRuntimeTransactionMethod(tx.method, tx.is_likely_native_token_transfer),
}
}),
Expand Down

0 comments on commit f74f9da

Please sign in to comment.