Skip to content

Commit

Permalink
v13.12.2: fix World App transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Oct 7, 2024
1 parent 93421ec commit 3bb11b3
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 56 deletions.
22 changes: 11 additions & 11 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -50523,18 +50523,18 @@ 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 })
};

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 {
Expand All @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 });
Expand Down
22 changes: 11 additions & 11 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2087,18 +2087,18 @@ 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 })
};

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 {
Expand All @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 });
Expand Down
22 changes: 11 additions & 11 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -50529,18 +50529,18 @@

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

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 {
Expand All @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 });
Expand Down
22 changes: 11 additions & 11 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2092,18 +2092,18 @@

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

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 {
Expand All @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 });
Expand Down
2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
18 changes: 9 additions & 9 deletions src/platforms/evm/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ 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 })
}

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 {
Expand All @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 3bb11b3

Please sign in to comment.