Skip to content

Commit

Permalink
SDK 0.2.0-beta.3 version release (#56)
Browse files Browse the repository at this point in the history
* Readme update (#27)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* SDK Version 0.0.1-beta.5 (#34)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* estimation implementation for both non gasless and gasless flow (#25)

* gas estimation addition

* fixes

* fixes and tests update

* sig transfer file removed

* insufficient balance unit test added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Nft edge cases fix (#29)

* duplicate entry bug fix

* amount edge case fix

* optimised and refactored the code

* nft tests updated for gas estimation

* types check added (#30)

* Feat/linting enabled (#31)

* types check added

* linting enabled fix

* pre hook commit

* Cosmetic/code refactoring (#33)

* code division

* native token refactor

* Permit2 transactions refactor

* test fix for not a function issue and some lint rule

* test failed fix added

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* readme bugfix

* test script for both gasless and non gasless and bug fixes (#32)

* test script for both gasless and non gasless and bug fixes

* test fixes

* only balances flag addition

* added scripts as pre-commit hook

* merge changes

* fixes and scripts update

* url fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* version beta-5 package changes

* Update README.md

* Aarc SDK 0.0.1-beta.6 (#39)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* estimation implementation for both non gasless and gasless flow (#25)

* gas estimation addition

* fixes

* fixes and tests update

* sig transfer file removed

* insufficient balance unit test added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Nft edge cases fix (#29)

* duplicate entry bug fix

* amount edge case fix

* optimised and refactored the code

* nft tests updated for gas estimation

* types check added (#30)

* Feat/linting enabled (#31)

* types check added

* linting enabled fix

* pre hook commit

* Cosmetic/code refactoring (#33)

* code division

* native token refactor

* Permit2 transactions refactor

* test fix for not a function issue and some lint rule

* test failed fix added

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* readme bugfix

* test script for both gasless and non gasless and bug fixes (#32)

* test script for both gasless and non gasless and bug fixes

* test fixes

* only balances flag addition

* added scripts as pre-commit hook

* merge changes

* fixes and scripts update

* url fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Update README.md (#37)

Updated the booking link with the new team Calendly link.

* Fix/gasless bug (#36)

* gasless bug

* test update

* transaction messages

* formatting

* bug fix

* test fixes

* single permit2 unit test added

* lint changes

* POLYGON fix for USDC permit

* permitToken wait bug fix

* error fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* arbitrum goerli support added (#38)

* arbitrum goerli support added

* arbitrum goerli scripts added and tested

* version update

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* SDK 0.0.8 (#43)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* estimation implementation for both non gasless and gasless flow (#25)

* gas estimation addition

* fixes

* fixes and tests update

* sig transfer file removed

* insufficient balance unit test added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Nft edge cases fix (#29)

* duplicate entry bug fix

* amount edge case fix

* optimised and refactored the code

* nft tests updated for gas estimation

* types check added (#30)

* Feat/linting enabled (#31)

* types check added

* linting enabled fix

* pre hook commit

* Cosmetic/code refactoring (#33)

* code division

* native token refactor

* Permit2 transactions refactor

* test fix for not a function issue and some lint rule

* test failed fix added

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* readme bugfix

* test script for both gasless and non gasless and bug fixes (#32)

* test script for both gasless and non gasless and bug fixes

* test fixes

* only balances flag addition

* added scripts as pre-commit hook

* merge changes

* fixes and scripts update

* url fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Update README.md (#37)

Updated the booking link with the new team Calendly link.

* Fix/gasless bug (#36)

* gasless bug

* test update

* transaction messages

* formatting

* bug fix

* test fixes

* single permit2 unit test added

* lint changes

* POLYGON fix for USDC permit

* permitToken wait bug fix

* error fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* arbitrum goerli support added (#38)

* arbitrum goerli support added

* arbitrum goerli scripts added and tested

* version update

* minor changes

* Feat/wallet deployment (#41)

* walelt deployment and native transfer

* formatting

* safe bug fix

* bug fixes

* permit bug fix (#42)

* permit bug fix

* transfer available tokens

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* package version update

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* Aarc-SDK 0.0.9 version (#47)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* estimation implementation for both non gasless and gasless flow (#25)

* gas estimation addition

* fixes

* fixes and tests update

* sig transfer file removed

* insufficient balance unit test added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Nft edge cases fix (#29)

* duplicate entry bug fix

* amount edge case fix

* optimised and refactored the code

* nft tests updated for gas estimation

* types check added (#30)

* Feat/linting enabled (#31)

* types check added

* linting enabled fix

* pre hook commit

* Cosmetic/code refactoring (#33)

* code division

* native token refactor

* Permit2 transactions refactor

* test fix for not a function issue and some lint rule

* test failed fix added

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* readme bugfix

* test script for both gasless and non gasless and bug fixes (#32)

* test script for both gasless and non gasless and bug fixes

* test fixes

* only balances flag addition

* added scripts as pre-commit hook

* merge changes

* fixes and scripts update

* url fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Update README.md (#37)

Updated the booking link with the new team Calendly link.

* Fix/gasless bug (#36)

* gasless bug

* test update

* transaction messages

* formatting

* bug fix

* test fixes

* single permit2 unit test added

* lint changes

* POLYGON fix for USDC permit

* permitToken wait bug fix

* error fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* arbitrum goerli support added (#38)

* arbitrum goerli support added

* arbitrum goerli scripts added and tested

* version update

* minor changes

* Feat/wallet deployment (#41)

* walelt deployment and native transfer

* formatting

* safe bug fix

* bug fixes

* permit bug fix (#42)

* permit bug fix

* transfer available tokens

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* package version update

* readme updated (#45)

* readme updated

* wallet deploy bug fixes

* formatting changes

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* Version 9 changes

* Aarc SDK version 0.2.0-beta.1 (#50)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* estimation implementation for both non gasless and gasless flow (#25)

* gas estimation addition

* fixes

* fixes and tests update

* sig transfer file removed

* insufficient balance unit test added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Nft edge cases fix (#29)

* duplicate entry bug fix

* amount edge case fix

* optimised and refactored the code

* nft tests updated for gas estimation

* types check added (#30)

* Feat/linting enabled (#31)

* types check added

* linting enabled fix

* pre hook commit

* Cosmetic/code refactoring (#33)

* code division

* native token refactor

* Permit2 transactions refactor

* test fix for not a function issue and some lint rule

* test failed fix added

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* readme bugfix

* test script for both gasless and non gasless and bug fixes (#32)

* test script for both gasless and non gasless and bug fixes

* test fixes

* only balances flag addition

* added scripts as pre-commit hook

* merge changes

* fixes and scripts update

* url fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Update README.md (#37)

Updated the booking link with the new team Calendly link.

* Fix/gasless bug (#36)

* gasless bug

* test update

* transaction messages

* formatting

* bug fix

* test fixes

* single permit2 unit test added

* lint changes

* POLYGON fix for USDC permit

* permitToken wait bug fix

* error fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* arbitrum goerli support added (#38)

* arbitrum goerli support added

* arbitrum goerli scripts added and tested

* version update

* minor changes

* Feat/wallet deployment (#41)

* walelt deployment and native transfer

* formatting

* safe bug fix

* bug fixes

* permit bug fix (#42)

* permit bug fix

* transfer available tokens

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* package version update

* readme updated (#45)

* readme updated

* wallet deploy bug fixes

* formatting changes

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* minor fixes

* Feat/gasless gelato (#46)

* readme updated

* gasless endpoint integration

* tokenInfo changed to array

* url updated

* test fixes

* gasless updates in sdk

* forward implementation (#48)

* foward implementation

* fixes

* fixes added

* test fix and gasPrice endpoint consumption

* Feat/forward (#51)

* readme updated

* gasless endpoint integration

* tokenInfo changed to array

* url updated

* test fixes

* gasless updates in sdk

* foward implementation

* fixes

* fixes added

* test fix and gasPrice endpoint consumption

* final fixes

* url update

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* Aarc SDK 0.2.0-beta.1 release (#52)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* estimation implementation for both non gasless and gasless flow (#25)

* gas estimation addition

* fixes

* fixes and tests update

* sig transfer file removed

* insufficient balance unit test added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Nft edge cases fix (#29)

* duplicate entry bug fix

* amount edge case fix

* optimised and refactored the code

* nft tests updated for gas estimation

* types check added (#30)

* Feat/linting enabled (#31)

* types check added

* linting enabled fix

* pre hook commit

* Cosmetic/code refactoring (#33)

* code division

* native token refactor

* Permit2 transactions refactor

* test fix for not a function issue and some lint rule

* test failed fix added

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* readme bugfix

* test script for both gasless and non gasless and bug fixes (#32)

* test script for both gasless and non gasless and bug fixes

* test fixes

* only balances flag addition

* added scripts as pre-commit hook

* merge changes

* fixes and scripts update

* url fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Update README.md (#37)

Updated the booking link with the new team Calendly link.

* Fix/gasless bug (#36)

* gasless bug

* test update

* transaction messages

* formatting

* bug fix

* test fixes

* single permit2 unit test added

* lint changes

* POLYGON fix for USDC permit

* permitToken wait bug fix

* error fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* arbitrum goerli support added (#38)

* arbitrum goerli support added

* arbitrum goerli scripts added and tested

* version update

* minor changes

* Feat/wallet deployment (#41)

* walelt deployment and native transfer

* formatting

* safe bug fix

* bug fixes

* permit bug fix (#42)

* permit bug fix

* transfer available tokens

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* package version update

* readme updated (#45)

* readme updated

* wallet deploy bug fixes

* formatting changes

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* minor fixes

* Feat/gasless gelato (#46)

* readme updated

* gasless endpoint integration

* tokenInfo changed to array

* url updated

* test fixes

* gasless updates in sdk

* forward implementation (#48)

* foward implementation

* fixes

* fixes added

* test fix and gasPrice endpoint consumption

* Feat/forward (#51)

* readme updated

* gasless endpoint integration

* tokenInfo changed to array

* url updated

* test fixes

* gasless updates in sdk

* foward implementation

* fixes

* fixes added

* test fix and gasPrice endpoint consumption

* final fixes

* url update

* sepolia support

* msg fix

* package release changes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* Forwarder fixes (#55)

* tests and safe deploy fun

* internal functions mocking

* tests updated

* Signer fix and biconomy get wallets function (#20)

* signer constructor requirement removed

* biconomy get all wallets function added

* types added for multiple params

* testing workflow added

* Sdk bug fixes (#21)

* nft tokenId added

* types file name change

* readme update

* nft transfer gasless updated

* package version changes

* Update README.md

* Update README.md - CRITICAL (#26)

Updated the rebranded form link

* Update README.md (#24)

* Update README.md

Fixed typo

* relayer key added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* estimation implementation for both non gasless and gasless flow (#25)

* gas estimation addition

* fixes

* fixes and tests update

* sig transfer file removed

* insufficient balance unit test added

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Nft edge cases fix (#29)

* duplicate entry bug fix

* amount edge case fix

* optimised and refactored the code

* nft tests updated for gas estimation

* types check added (#30)

* Feat/linting enabled (#31)

* types check added

* linting enabled fix

* pre hook commit

* Cosmetic/code refactoring (#33)

* code division

* native token refactor

* Permit2 transactions refactor

* test fix for not a function issue and some lint rule

* test failed fix added

* minor fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* readme bugfix

* test script for both gasless and non gasless and bug fixes (#32)

* test script for both gasless and non gasless and bug fixes

* test fixes

* only balances flag addition

* added scripts as pre-commit hook

* merge changes

* fixes and scripts update

* url fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* Update README.md (#37)

Updated the booking link with the new team Calendly link.

* Fix/gasless bug (#36)

* gasless bug

* test update

* transaction messages

* formatting

* bug fix

* test fixes

* single permit2 unit test added

* lint changes

* POLYGON fix for USDC permit

* permitToken wait bug fix

* error fix

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* arbitrum goerli support added (#38)

* arbitrum goerli support added

* arbitrum goerli scripts added and tested

* version update

* minor changes

* Feat/wallet deployment (#41)

* walelt deployment and native transfer

* formatting

* safe bug fix

* bug fixes

* permit bug fix (#42)

* permit bug fix

* transfer available tokens

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>

* package version update

* readme updated (#45)

* readme updated

* wallet deploy bug fixes

* formatting changes

---------

Co-authored-by: Anshul Yadav <55681256+anshulforyou@users.noreply.github.com>

* minor fixes

* Feat/gasless gelato (#46)

* readme updated

* gasless endpoint integration

* tokenInfo changed to array

* url updated

* test fixes

* gasless updates in sdk

* forward implementation (#48)

* foward implementation

* fixes

* fixes added

* test fix and gasPrice endpoint consumption

* Feat/forward (#51)

* readme updated

* gasless endpoint integration

* tokenInfo changed to array

* url updated

* test fixes

* gasless updates in sdk

* foward implementation

* fixes

* fixes added

* test fix and gasPrice endpoint consumption

* final fixes

* url update

* sepolia support

* msg fix

* package release changes

* minor change

* publish cmd added

* Fix/ux error messages (#54)

* bug fix for ux

* fixes

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>

* package update

---------

Co-authored-by: talhamalik883 <talhamalik883@gmail.com>
Co-authored-by: Ari <52634803+theblackmace@users.noreply.github.com>
  • Loading branch information
3 people committed Jan 10, 2024
1 parent d44afd3 commit d11e0a9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aarc-sdk",
"version": "0.2.0-beta.1",
"version": "0.2.0-beta.3",
"description": "The Aarc SDK is a TypeScript library that makes it easy for developers to transfer assets from Externally Owned Accounts (EOA) to any destination address. It simplifies the asset transfer process by supporting various token standards, such as ERC20 and ERC721, and offering custom flows like batched transactions, gasless transactions, and paying gas fees with the same asset being moved. Additionally, it enables custom contract interaction within the same transaction using permit2(), allowing for direct swaps and bridge functionality.",
"main": "dist/index.js",
"scripts": {
Expand All @@ -13,7 +13,8 @@
"execute:gasless": "ts-node scripts/Gasless.ts",
"execute:nongasless": "ts-node scripts/NonGasless.ts",
"execute:forward": "ts-node scripts/Forward.ts",
"prepare": "husky install"
"prepare": "husky install",
"publish": "npm run build && npm publish"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css,scss,md}": [
Expand Down
4 changes: 2 additions & 2 deletions scripts/Gasless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const transferErc20Tokens = async () => {
!('message' in result && typeof result.message === 'string') ||
!('taskId' in result && typeof result.taskId === 'string') ||
(result.message !== 'Transaction sent' &&
result.message !== 'Supplied token does not exist' &&
result.message !== 'Insufficient balance' &&
result.message !== 'Transaction Added to Queue' &&
result.message !== 'Token Permit tx Sent')
) {
Expand Down Expand Up @@ -303,7 +303,7 @@ export const transferNftsOnly = async () => {
!('message' in result && typeof result.message === 'string') ||
!('txHash' in result && typeof result.txHash === 'string') ||
(result.message !== 'Transaction sent' &&
result.message !== 'Supplied token does not exist' &&
result.message !== 'Insufficient balance' &&
result.message !== 'Nft transfer tx sent')
) {
throw new Error('Nft Transfer Failed');
Expand Down
19 changes: 16 additions & 3 deletions src/AarcSDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class AarcSDK {
response.push({
tokenAddress: tandA.tokenAddress,
amount: tandA?.amount,
message: 'Supplied token does not exist',
message: `Insufficient balance`,
});
}
tandA.tokenAddress = tandA.tokenAddress.toLowerCase();
Expand Down Expand Up @@ -528,7 +528,7 @@ class AarcSDK {
response.push({
tokenAddress: tandA.tokenAddress,
amount: tandA?.amount,
message: 'Supplied token does not exist',
message: `Insufficient balance`,
});
}
tandA.tokenAddress = tandA.tokenAddress.toLowerCase();
Expand Down Expand Up @@ -1038,10 +1038,23 @@ class AarcSDK {
response.push({
tokenAddress: tandA.tokenAddress,
amount: tandA?.amount,
message: 'Supplied token does not exist',
message: `Insufficient balance`,
});
}
tandA.tokenAddress = tandA.tokenAddress.toLowerCase();

if (
matchingToken &&
!matchingToken.permitExist &&
BigNumber.from(matchingToken.permit2Allowance).eq(BigNumber.from(0))
) {
response.push({
tokenAddress: tandA.tokenAddress.toLowerCase(),
message: `Forward migration is not supported for ${tandA.tokenAddress.toLowerCase()} on the chain ID ${
this.chainId
}`,
});
}
});

if (transferTokenDetails) {
Expand Down
2 changes: 1 addition & 1 deletion tests/AarcSDK.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe('Aarc SDK executeMigration', () => {
amount: expect.objectContaining({
_hex: '0x77359400',
}),
message: 'Supplied token does not exist',
message: 'Insufficient balance',
});

expect(migrationResponse[1]).toEqual({
Expand Down

0 comments on commit d11e0a9

Please sign in to comment.