diff --git a/dist/esm/index.evm.js b/dist/esm/index.evm.js index a115b95..bd2ae3d 100644 --- a/dist/esm/index.evm.js +++ b/dist/esm/index.evm.js @@ -50523,9 +50523,9 @@ const getTransaction$2 = async({ paymentRoute, options })=> { const transaction = { blockchain: paymentRoute.blockchain, - to: transactionAddress({ paymentRoute }), - api: transactionApi({ paymentRoute }), - method: transactionMethod({ paymentRoute }), + to: transactionAddress({ paymentRoute, options }), + api: transactionApi({ paymentRoute, options }), + method: transactionMethod({ paymentRoute, options }), params: await transactionParams({ paymentRoute, options }), value: transactionValue({ paymentRoute }) }; @@ -50533,8 +50533,8 @@ const getTransaction$2 = async({ paymentRoute, options })=> { return transaction }; -const transactionAddress = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionAddress = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return paymentRoute.toAddress } else { @@ -50545,8 +50545,8 @@ const transactionAddress = ({ paymentRoute })=> { } }; -const transactionApi = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionApi = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { @@ -50557,8 +50557,8 @@ const transactionApi = ({ paymentRoute })=> { } }; -const transactionMethod = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionMethod = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _5 => _5.wallet, 'optionalAccess', _6 => _6.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -50653,7 +50653,7 @@ const getPermit2SignatureTransferNonce = async({ address, blockchain })=>{ }; const transactionParams = async ({ paymentRoute, options })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _7 => _7.wallet, 'optionalAccess', _8 => _8.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -50687,7 +50687,7 @@ const transactionParams = async ({ paymentRoute, options })=> { } } let params; - if(options && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ + if(options && _optionalChain$1([options, 'optionalAccess', _9 => _9.wallet, 'optionalAccess', _10 => _10.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ const permitDeadline = Math.floor(Date.now() / 1000) + 30 * 60; const nonce = getPermit2SignatureTransferNonce({ blockchain: paymentRoute.blockchain, address: paymentRoute.fromAddress }); diff --git a/dist/esm/index.js b/dist/esm/index.js index 0e603d5..9492107 100644 --- a/dist/esm/index.js +++ b/dist/esm/index.js @@ -2087,9 +2087,9 @@ const getTransaction$2 = async({ paymentRoute, options })=> { const transaction = { blockchain: paymentRoute.blockchain, - to: transactionAddress({ paymentRoute }), - api: transactionApi({ paymentRoute }), - method: transactionMethod({ paymentRoute }), + to: transactionAddress({ paymentRoute, options }), + api: transactionApi({ paymentRoute, options }), + method: transactionMethod({ paymentRoute, options }), params: await transactionParams({ paymentRoute, options }), value: transactionValue({ paymentRoute }) }; @@ -2097,8 +2097,8 @@ const getTransaction$2 = async({ paymentRoute, options })=> { return transaction }; -const transactionAddress = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionAddress = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return paymentRoute.toAddress } else { @@ -2109,8 +2109,8 @@ const transactionAddress = ({ paymentRoute })=> { } }; -const transactionApi = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionApi = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { @@ -2121,8 +2121,8 @@ const transactionApi = ({ paymentRoute })=> { } }; -const transactionMethod = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionMethod = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _5 => _5.wallet, 'optionalAccess', _6 => _6.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -2217,7 +2217,7 @@ const getPermit2SignatureTransferNonce = async({ address, blockchain })=>{ }; const transactionParams = async ({ paymentRoute, options })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _7 => _7.wallet, 'optionalAccess', _8 => _8.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -2251,7 +2251,7 @@ const transactionParams = async ({ paymentRoute, options })=> { } } let params; - if(options && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ + if(options && _optionalChain$1([options, 'optionalAccess', _9 => _9.wallet, 'optionalAccess', _10 => _10.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ const permitDeadline = Math.floor(Date.now() / 1000) + 30 * 60; const nonce = getPermit2SignatureTransferNonce({ blockchain: paymentRoute.blockchain, address: paymentRoute.fromAddress }); diff --git a/dist/umd/index.evm.js b/dist/umd/index.evm.js index 28ecd5c..9f2dcf7 100644 --- a/dist/umd/index.evm.js +++ b/dist/umd/index.evm.js @@ -50529,9 +50529,9 @@ const transaction = { blockchain: paymentRoute.blockchain, - to: transactionAddress({ paymentRoute }), - api: transactionApi({ paymentRoute }), - method: transactionMethod({ paymentRoute }), + to: transactionAddress({ paymentRoute, options }), + api: transactionApi({ paymentRoute, options }), + method: transactionMethod({ paymentRoute, options }), params: await transactionParams({ paymentRoute, options }), value: transactionValue({ paymentRoute }) }; @@ -50539,8 +50539,8 @@ return transaction }; - const transactionAddress = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { + const transactionAddress = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return paymentRoute.toAddress } else { @@ -50551,8 +50551,8 @@ } }; - const transactionApi = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { + const transactionApi = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return undefined } else { @@ -50563,8 +50563,8 @@ } }; - const transactionMethod = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { + const transactionMethod = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _5 => _5.wallet, 'optionalAccess', _6 => _6.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -50659,7 +50659,7 @@ }; const transactionParams = async ({ paymentRoute, options })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _7 => _7.wallet, 'optionalAccess', _8 => _8.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -50693,7 +50693,7 @@ } } let params; - if(options && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ + if(options && _optionalChain$1([options, 'optionalAccess', _9 => _9.wallet, 'optionalAccess', _10 => _10.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ const permitDeadline = Math.floor(Date.now() / 1000) + 30 * 60; const nonce = getPermit2SignatureTransferNonce({ blockchain: paymentRoute.blockchain, address: paymentRoute.fromAddress }); diff --git a/dist/umd/index.js b/dist/umd/index.js index 2c02923..9e4ed66 100644 --- a/dist/umd/index.js +++ b/dist/umd/index.js @@ -2092,9 +2092,9 @@ const transaction = { blockchain: paymentRoute.blockchain, - to: transactionAddress({ paymentRoute }), - api: transactionApi({ paymentRoute }), - method: transactionMethod({ paymentRoute }), + to: transactionAddress({ paymentRoute, options }), + api: transactionApi({ paymentRoute, options }), + method: transactionMethod({ paymentRoute, options }), params: await transactionParams({ paymentRoute, options }), value: transactionValue({ paymentRoute }) }; @@ -2102,8 +2102,8 @@ return transaction }; - const transactionAddress = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { + const transactionAddress = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return paymentRoute.toAddress } else { @@ -2114,8 +2114,8 @@ } }; - const transactionApi = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { + const transactionApi = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return undefined } else { @@ -2126,8 +2126,8 @@ } }; - const transactionMethod = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { + const transactionMethod = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _5 => _5.wallet, 'optionalAccess', _6 => _6.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -2222,7 +2222,7 @@ }; const transactionParams = async ({ paymentRoute, options })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _ => _.wallet, 'optionalAccess', _2 => _2.name]) !== 'World App') { + if(paymentRoute.directTransfer && !paymentRoute.fee && _optionalChain$1([options, 'optionalAccess', _7 => _7.wallet, 'optionalAccess', _8 => _8.name]) !== 'World App') { if(paymentRoute.toToken.address == Blockchains__default["default"][paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer @@ -2256,7 +2256,7 @@ } } let params; - if(options && _optionalChain$1([options, 'optionalAccess', _3 => _3.wallet, 'optionalAccess', _4 => _4.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ + if(options && _optionalChain$1([options, 'optionalAccess', _9 => _9.wallet, 'optionalAccess', _10 => _10.name]) === 'World App' && paymentRoute.blockchain === 'worldchain'){ const permitDeadline = Math.floor(Date.now() / 1000) + 30 * 60; const nonce = getPermit2SignatureTransferNonce({ blockchain: paymentRoute.blockchain, address: paymentRoute.fromAddress }); diff --git a/package.evm.json b/package.evm.json index db2c7df..648059d 100644 --- a/package.evm.json +++ b/package.evm.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-payments-evm", "moduleName": "Web3Payments", - "version": "13.12.1", + "version": "13.12.2", "description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.", "main": "dist/umd/index.evm.js", "module": "dist/esm/index.evm.js", diff --git a/package.json b/package.json index ea8cb65..c9f111a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-payments", "moduleName": "Web3Payments", - "version": "13.12.1", + "version": "13.12.2", "description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.", "main": "dist/umd/index.js", "module": "dist/esm/index.js", diff --git a/package.solana.json b/package.solana.json index 67a77da..ebfd719 100644 --- a/package.solana.json +++ b/package.solana.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-payments-solana", "moduleName": "Web3Payments", - "version": "13.12.1", + "version": "13.12.2", "description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.", "main": "dist/umd/index.solana.js", "module": "dist/esm/index.solana.js", diff --git a/src/platforms/evm/transaction.js b/src/platforms/evm/transaction.js index c67218f..acee227 100644 --- a/src/platforms/evm/transaction.js +++ b/src/platforms/evm/transaction.js @@ -52,9 +52,9 @@ const getTransaction = async({ paymentRoute, options })=> { const transaction = { blockchain: paymentRoute.blockchain, - to: transactionAddress({ paymentRoute }), - api: transactionApi({ paymentRoute }), - method: transactionMethod({ paymentRoute }), + to: transactionAddress({ paymentRoute, options }), + api: transactionApi({ paymentRoute, options }), + method: transactionMethod({ paymentRoute, options }), params: await transactionParams({ paymentRoute, options }), value: transactionValue({ paymentRoute }) } @@ -62,8 +62,8 @@ const getTransaction = async({ paymentRoute, options })=> { return transaction } -const transactionAddress = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionAddress = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && options?.wallet?.name !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return paymentRoute.toAddress } else { @@ -74,8 +74,8 @@ const transactionAddress = ({ paymentRoute })=> { } } -const transactionApi = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionApi = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && options?.wallet?.name !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { @@ -86,8 +86,8 @@ const transactionApi = ({ paymentRoute })=> { } } -const transactionMethod = ({ paymentRoute })=> { - if(paymentRoute.directTransfer && !paymentRoute.fee) { +const transactionMethod = ({ paymentRoute, options })=> { + if(paymentRoute.directTransfer && !paymentRoute.fee && options?.wallet?.name !== 'World App') { if(paymentRoute.toToken.address == Blockchains[paymentRoute.blockchain].currency.address) { return undefined } else { // standard token transfer