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 14, 2025
1 parent 8f0ac2e commit 1dcc16a
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 @@ -8,6 +8,7 @@

- changed: (SwapKit) Use `data` provided by quote endpoint instead of encoding it locally
- 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 @@ -230,8 +230,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 @@ -241,7 +239,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 @@ -502,7 +499,7 @@ export function makeRangoPlugin(opts: EdgeCorePluginOptions): EdgeSwapPlugin {
spendTargets: [
{
memo: evmTransaction.txData,
nativeAmount: ethNativeAmount,
nativeAmount: nativeAmount,
publicAddress: evmTransaction.txTo
}
],
Expand Down

0 comments on commit 1dcc16a

Please sign in to comment.