diff --git a/package.json b/package.json index e81d44d32d8..e95e1737304 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@notifee/react-native": "7.8.2", "@rainbow-me/provider": "0.0.12", "@rainbow-me/react-native-animated-number": "0.0.2", - "@rainbow-me/swaps": "0.23.0", + "@rainbow-me/swaps": "0.24.0", "@react-native-async-storage/async-storage": "1.23.1", "@react-native-camera-roll/camera-roll": "7.7.0", "@react-native-clipboard/clipboard": "1.13.2", diff --git a/src/__swaps__/screens/Swap/components/ReviewPanel.tsx b/src/__swaps__/screens/Swap/components/ReviewPanel.tsx index ae3d9243882..fb909af5ca9 100644 --- a/src/__swaps__/screens/Swap/components/ReviewPanel.tsx +++ b/src/__swaps__/screens/Swap/components/ReviewPanel.tsx @@ -91,13 +91,13 @@ const RainbowFee = () => { }).amount; const { display: feeDisplay } = convertRawAmountToBalance(quote.fee.toString(), { - decimals: quote.feeTokenAsset.decimals, - symbol: quote.feeTokenAsset.symbol, + decimals: quote?.feeTokenAsset?.decimals || 18, + symbol: quote?.feeTokenAsset?.symbol || 'ETH', }); rainbowFee.value = [feeDisplay, `${handleSignificantDecimals(multiply(feePercentage, 100), 2)}%`]; }, - [nativeAsset?.value?.decimals, nativeAsset?.value?.price?.value, nativeCurrency, rainbowFee] + [rainbowFee] ); useAnimatedReaction( diff --git a/yarn.lock b/yarn.lock index 2a2f3946569..94b70d87693 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4299,9 +4299,9 @@ __metadata: languageName: node linkType: hard -"@rainbow-me/swaps@npm:0.23.0": - version: 0.23.0 - resolution: "@rainbow-me/swaps@npm:0.23.0" +"@rainbow-me/swaps@npm:0.24.0": + version: 0.24.0 + resolution: "@rainbow-me/swaps@npm:0.24.0" dependencies: "@ethereumjs/util": "npm:9.0.0" "@ethersproject/abi": "npm:5.7.0" @@ -4316,7 +4316,7 @@ __metadata: "@ethersproject/transactions": "npm:5.7.0" "@ethersproject/wallet": "npm:5.7.0" "@metamask/eth-sig-util": "npm:7.0.0" - checksum: 10c0/3029ca9ed16a45af1961d2fdc79c545ae20a55212b38c8d3daba707617f8630f5328bc52e0e4732d97bffdbda62408093b3c871ef696322f1853d71231561a0f + checksum: 10c0/c04cdd4f8dca5c2d6f8e371dca88e6359387dea9c9241a98fcacb334cd2016ba985ae70e412bc8983f7074c17a61f80edef1d367222defceb2666c750386f8b9 languageName: node linkType: hard @@ -7811,7 +7811,7 @@ __metadata: "@notifee/react-native": "npm:7.8.2" "@rainbow-me/provider": "npm:0.0.12" "@rainbow-me/react-native-animated-number": "npm:0.0.2" - "@rainbow-me/swaps": "npm:0.23.0" + "@rainbow-me/swaps": "npm:0.24.0" "@react-native-async-storage/async-storage": "npm:1.23.1" "@react-native-camera-roll/camera-roll": "npm:7.7.0" "@react-native-clipboard/clipboard": "npm:1.13.2"