Skip to content

Commit

Permalink
Fix Rango amount metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
peachbits committed Jan 9, 2025
1 parent 4a97fc5 commit 4d14446
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- fixed: Incorrect date timestamp for 0xGasless transactions.
- fixed: Rango amount metadata

## 2.16.0 (2024-12-16)

Expand Down
5 changes: 1 addition & 4 deletions src/swap/defi/rango.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ export function makeRangoPlugin(opts: EdgeCorePluginOptions): EdgeSwapPlugin {
throw new SwapCurrencyError(swapInfo, request)
}

let ethNativeAmount = nativeAmount

const fromToken =
fromTokenId != null
? fromWallet.currencyConfig.allTokens[fromTokenId]
Expand All @@ -240,7 +238,6 @@ export function makeRangoPlugin(opts: EdgeCorePluginOptions): EdgeSwapPlugin {
fromContractAddress = PARENT_TOKEN_CONTRACT_ADDRESS
} else {
fromContractAddress = fromToken?.networkLocation?.contractAddress
ethNativeAmount = '0'
}

const toToken =
Expand Down Expand Up @@ -501,7 +498,7 @@ export function makeRangoPlugin(opts: EdgeCorePluginOptions): EdgeSwapPlugin {
spendTargets: [
{
memo: evmTransaction.txData,
nativeAmount: ethNativeAmount,
nativeAmount: nativeAmount,
publicAddress: evmTransaction.txTo
}
],
Expand Down

0 comments on commit 4d14446

Please sign in to comment.