Posted on c/ElrondDevelopers 2 rea4995560776c/ElrondDevelopers 2 years ago When I send a transaction, multi confirm modals are popped up, Why it happens? Comment 2 Comments mwf81318617 2years ago No clue why that would happen, what does your code look like? rea4995560776 2years ago `try{ const { address, abi } = contracts[contract]; const contractAddress = new Address(address); const contractAbi = new SmartContractAbi(abi, implementInterface); const appliedContract = new SmartContract({ address: contractAddress, abi: contractAbi }); const userAccount = new Account(new Address(callerAddress)); const isNativePayment = nativeCurrency.includes(token); const tx = appliedContract.methodsExplicit[method](args).withNonce(userAccount.nonce).withGasLimit(600000000).withValue(TokenPayment.egldFromAmount(isNativePayment ? amount : 0)) .withChainID(isDev ? 'T' : '1'); if(!isNativePayment && token) { tx.withSingleESDTTransfer(TokenPayment.fungibleFromAmount(token, amount, decimals)); } const fullTransaction = tx.buildTransaction(); const { sessionId } = await sendTransactions({ transactions: [fullTransaction], }); return sessionId; } catch(e) { return null; }`
No clue why that would happen, what does your code look like?
`try{ const { address, abi } = contracts[contract]; const contractAddress = new Address(address); const contractAbi = new SmartContractAbi(abi, implementInterface); const appliedContract = new SmartContract({ address: contractAddress, abi: contractAbi }); const userAccount = new Account(new Address(callerAddress)); const isNativePayment = nativeCurrency.includes(token); const tx = appliedContract.methodsExplicit[method](args).withNonce(userAccount.nonce).withGasLimit(600000000).withValue(TokenPayment.egldFromAmount(isNativePayment ? amount : 0)) .withChainID(isDev ? 'T' : '1'); if(!isNativePayment && token) { tx.withSingleESDTTransfer(TokenPayment.fungibleFromAmount(token, amount, decimals)); } const fullTransaction = tx.buildTransaction(); const { sessionId } = await sendTransactions({ transactions: [fullTransaction], }); return sessionId; } catch(e) { return null; }`