Skip to content

Commit

Permalink
Remove old Nexus API transition workaround
Browse files Browse the repository at this point in the history
All known Nexus instances have been updated to run
the new version of the API, so this compatibility wrapper
is no longer necessary.
  • Loading branch information
csillag committed Feb 27, 2025
1 parent 85ad67a commit ec46679
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/oasis-nexus/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,6 @@ export const useGetRuntimeTransactions: typeof generated.useGetRuntimeTransactio
transactions: data.transactions.map(tx => {
return {
...tx,
// TODO: this workaround can be removed as soon as all deployed Nexus instances
// have been updated to at least v0.5.3
signers: tx.signers ?? [
{ address: tx.sender_0, address_eth: tx.sender_0_eth, nonce: tx.nonce_0 },
],
to_eth: tx.to_eth || fallbackEthAddress(tx.to, params?.rel),
eth_hash: tx.eth_hash ? `0x${tx.eth_hash}` : undefined,
// TODO: Decimals may not be correct, should not depend on ParaTime decimals, but fee_symbol
Expand Down Expand Up @@ -384,11 +379,6 @@ export const useGetRuntimeTransactionsTxHash: typeof generated.useGetRuntimeTran
transactions: data.transactions.map(tx => {
return {
...tx,
// TODO: this workaround can be removed as soon as all deployed Nexus instances
// have been updated to at least v0.5.3
signers: tx.signers ?? [
{ address: tx.sender_0, address_eth: tx.sender_0_eth, nonce: tx.nonce_0 },
],
eth_hash: tx.eth_hash ? `0x${tx.eth_hash}` : undefined,
// TODO: Decimals may not be correct, should not depend on ParaTime decimals, but fee_symbol
fee: fromBaseUnits(tx.fee, paraTimesConfig[runtime].decimals),
Expand Down

0 comments on commit ec46679

Please sign in to comment.