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