Remove deep link path and prevent re-render from useEffect #7

Merged
nabarun merged 4 commits from deep-stack/laconic-wallet-web:sk-fix-memory-leak into main 2024-08-01 06:18:03 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 56d2b11bc8 - Show all commits

View File

@ -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);

View File

@ -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);