diff --git a/src/screens/WalletEmbed.tsx b/src/screens/WalletEmbed.tsx index 8873e51..2a8d2f9 100644 --- a/src/screens/WalletEmbed.tsx +++ b/src/screens/WalletEmbed.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useState, useCallback, useRef } from 'react'; - import { ScrollView, View } from 'react-native'; import { Button, @@ -153,10 +152,6 @@ export const WalletEmbed = () => { network!.nativeDenom!.toLowerCase(), ); - const gasPrice = GasPrice.fromString( - network.gasPrice! + network.nativeDenom, - ); - const sendMsg = { typeUrl: '/cosmos.bank.v1beta1.MsgSend', value: { @@ -171,20 +166,15 @@ export const WalletEmbed = () => { }, }; - const gasEstimation = await client.simulate( - fromAddress, - [sendMsg], - MEMO, - ); - + const gasEstimation = await client.simulate(fromAddress, [sendMsg], MEMO); const gasLimit = String( Math.round(gasEstimation * Number(process.env.REACT_APP_GAS_ADJUSTMENT)), ) - - const cosmosFees = calculateFee(Number(gasLimit), gasPrice); setGasLimit(gasLimit); - + + const gasPrice = GasPrice.fromString(network.gasPrice! + network.nativeDenom); + const cosmosFees = calculateFee(Number(gasLimit), gasPrice); setFees(cosmosFees.amount[0].amount); setTransactionDetails({ @@ -319,13 +309,13 @@ export const WalletEmbed = () => { mode="contained" onPress={rejectRequestHandler} buttonColor="#B82B0D" + disabled={isTxLoading} > No ) : null} -