diff --git a/.changelog/1336.bugfix.md b/.changelog/1336.bugfix.md new file mode 100644 index 000000000..fc344865e --- /dev/null +++ b/.changelog/1336.bugfix.md @@ -0,0 +1,3 @@ +Fix issue with empty ticker + +- tx.body.amount.Denomination can be an empty string diff --git a/src/oasis-nexus/api.ts b/src/oasis-nexus/api.ts index e5da8f9fa..cc33435a7 100644 --- a/src/oasis-nexus/api.ts +++ b/src/oasis-nexus/api.ts @@ -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), } }), @@ -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), } }),