Remove undefined default value only for input variables
This commit is contained in:
parent
98755b9089
commit
56d2b11bc8
@ -51,8 +51,8 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
|
||||
const [cosmosStargateClient, setCosmosStargateClient] =
|
||||
useState<LaconicClient>();
|
||||
const [cosmosGasLimit, setCosmosGasLimit] = useState<string>('');
|
||||
const [fees, setFees] = useState<string>('');
|
||||
const [txError, setTxError] = useState<string>('');
|
||||
const [fees, setFees] = useState<string>();
|
||||
const [txError, setTxError] = useState<string>();
|
||||
const [isTxErrorDialogOpen, setIsTxErrorDialogOpen] = useState(false);
|
||||
const [isRequestAccepted, setIsRequestAccepted] = useState(false);
|
||||
|
||||
@ -197,7 +197,7 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
|
||||
// This amount is total fees required for transaction
|
||||
amount: [
|
||||
{
|
||||
amount: fees,
|
||||
amount: fees!,
|
||||
denom: requestedNetwork!.nativeDenom!,
|
||||
},
|
||||
],
|
||||
@ -299,7 +299,7 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
|
||||
</>
|
||||
</ScrollView>
|
||||
<TxErrorDialog
|
||||
error={txError}
|
||||
error={txError!}
|
||||
visible={isTxErrorDialogOpen}
|
||||
hideDialog={async () => {
|
||||
setIsTxErrorDialogOpen(false);
|
||||
|
@ -72,7 +72,7 @@ const ApproveTransfer = ({ route }: SignRequestProps) => {
|
||||
useState<SigningStargateClient>();
|
||||
const [fees, setFees] = useState<string>('');
|
||||
const [cosmosGasLimit, setCosmosGasLimit] = useState<string>('');
|
||||
const [txError, setTxError] = useState<string>('');
|
||||
const [txError, setTxError] = useState<string>();
|
||||
const [isTxErrorDialogOpen, setIsTxErrorDialogOpen] = useState(false);
|
||||
const [ethGasPrice, setEthGasPrice] = useState<BigNumber | null>();
|
||||
const [ethGasLimit, setEthGasLimit] = useState<BigNumber>();
|
||||
@ -655,7 +655,7 @@ const ApproveTransfer = ({ route }: SignRequestProps) => {
|
||||
</>
|
||||
)}
|
||||
<TxErrorDialog
|
||||
error={txError}
|
||||
error={txError!}
|
||||
visible={isTxErrorDialogOpen}
|
||||
hideDialog={() => {
|
||||
setIsTxErrorDialogOpen(false);
|
||||
|
Loading…
Reference in New Issue
Block a user