File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/invoice-dashboard/src/lib/dashboard Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 396
396
async function approve() {
397
397
try {
398
398
loading = true ;
399
+ isSigningTransaction = true ;
399
400
400
401
const approvers: { [key : string ]: () => Promise <void > } = {
401
402
[Types .Extension .PAYMENT_NETWORK_ID .ERC20_FEE_PROXY_CONTRACT ]:
430
431
console .error (" Something went wrong while approving ERC20: " , err );
431
432
} finally {
432
433
loading = false ;
434
+ isSigningTransaction = false ;
433
435
}
434
436
}
435
437
847
849
{/if }
848
850
<div class =" invoice-view-actions" >
849
851
{#if ! isPayee && ! unsupportedNetwork && ! isPaid && ! isRequestPayed && ! isSigningTransaction && ! unknownCurrency }
850
- {#if ! hasEnoughBalance }
852
+ {#if ! hasEnoughBalance && correctChain }
851
853
<div class =" balance-warning" >
852
854
Insufficient funds: {Number (userBalance ).toFixed (4 )}
853
855
{paymentCurrencies [0 ]?.symbol || " -" }
863
865
: " Pay Now" }
864
866
padding =" px-[12px] py-[6px]"
865
867
onClick ={handlePayment }
866
- disabled ={! hasEnoughBalance }
868
+ disabled ={correctChain
869
+ ? ! hasEnoughBalance || isSigningTransaction
870
+ : false }
867
871
/>
868
872
{/if }
869
873
</div >
You can’t perform that action at this time.
0 commit comments