From f1a71e531247e62d3ef0670bbe6003bbd5893242 Mon Sep 17 00:00:00 2001 From: Mohammad Ranjbar Z Date: Thu, 16 Mar 2023 16:50:51 +0330 Subject: [PATCH 1/7] Write migration for adding polygon tokens related to #908 --- ...-insert_polygon_givback_eligible_tokens.ts | 306 ++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 migration/1678950910841-insert_polygon_givback_eligible_tokens.ts diff --git a/migration/1678950910841-insert_polygon_givback_eligible_tokens.ts b/migration/1678950910841-insert_polygon_givback_eligible_tokens.ts new file mode 100644 index 000000000..c4d30243c --- /dev/null +++ b/migration/1678950910841-insert_polygon_givback_eligible_tokens.ts @@ -0,0 +1,306 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; +import { Token } from '../src/entities/token'; +import { NETWORK_IDS } from '../src/provider'; + +const polygonTokens = [ + { + symbol: 'AAVE', + name: 'Aave', + address: '0xD6DF932A45C0f255f85145f286eA0b292B21C90B', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', + }, + { + symbol: 'agEUR', + name: 'agEUR', + address: '0xE0B52e49357Fd4DAf2c15e02058DCE6BC0057db4', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8', + }, + { + symbol: 'ATOM', + name: 'Cosmos', + address: 'ATOM', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '', + }, + { + symbol: 'axlUSDC', + name: 'Axelar USDC', + address: '0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '', + }, + { + symbol: 'BIFI', + name: 'Beefy.Finance', + address: '0xFbdd194376de19a88118e84E279b977f165d01b8', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x2791BfD60D232150Bff86b39B7146c0eaAA2BA81', + }, + { + symbol: 'DAI', + name: 'DAI Stablecoin', + address: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + }, + { + symbol: 'WETH', + name: 'Wrapped Ether', + address: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', + }, + { + symbol: 'FRAX', + name: 'Frax', + address: '0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x853d955aCEf822Db058eb8505911ED77F175b99e', + }, + { + symbol: 'KLIMA', + name: 'Klima DAO', + address: '0x4e78011Ce80ee02d2c3e649Fb657E45898257815', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '', + }, + { + symbol: 'LDO', + name: 'Lido DAO Token', + address: '0xC3C7d422809852031b44ab29EEC9F1EfF2A58756', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32', + }, + { + symbol: 'LINK', + name: 'ChainLink Token', + address: '0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x514910771AF9Ca656af840dff83E8264EcF986CA', + }, + { + symbol: 'MAI', + name: 'Mai Finance', + address: '0xa3Fa99A148fA48D14Ed51d610c367C61876997F1', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '', + }, + { + symbol: 'MANA', + name: 'Decentraland', + address: '0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x0F5D2fB29fb7d3CFeE444a200298f468908cC942', + }, + { + symbol: 'QI', + name: 'Qi Dao', + address: '0x580A84C73811E1839F75d86d75d88cCa0c241fF4', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '', + }, + { + symbol: 'QUICK', + name: 'Quickswap (NEW)', + address: '0xB5C064F955D8e7F38fE0460C556a72987494eE17', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + // This is Quickswap, couldnt find Quickswap (New) + mainnetAddress: '0xd2bA23dE8a19316A638dc1e7a9ADdA1d74233368', + }, + { + symbol: 'WMATIC', + name: 'Wrapped Matic', + address: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0', + }, + { + symbol: 'SAND', + name: 'The Sandbox', + address: '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x3845badAde8e6dFF049820680d1F14bD3903a5d0', + }, + { + symbol: 'TUSD', + name: 'TrueUSD', + address: '0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x0000000000085d4780B73119b644AE5ecd22b376', + }, + { + symbol: 'UNI', + name: 'Uniswap', + address: '0xb33EaAd8d922B1083446DC23f610c2567fB5180f', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', + }, + { + symbol: 'USDC', + name: 'USD Coin', + address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + }, + { + symbol: 'USDT', + name: 'Tether USD', + address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7', + }, + { + symbol: 'PAXG', + name: 'Paxos Gold', + address: '0x553d3D295e0f695B9228246232eDF400ed3560B5', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x45804880De22913dAFE09f4980848ECE6EcbAf78', + }, + { + symbol: 'BAL', + name: 'Balancer', + address: '0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '', + }, + { + symbol: 'CRV', + name: 'Curve Finance', + address: '0x172370d5cd63279efa6d502dab29171933a610af', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0xba100000625a3754423978a60c9317c58a424e3D', + }, + { + symbol: 'ANKR', + name: 'Ankr', + address: '0x101A023270368c0D50BFfb62780F4aFd4ea79C35', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '', + }, + { + symbol: 'stMATIC', + name: 'Staked MATIC', + address: '0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x9ee91F9f426fA633d227f7a9b000E28b9dfd8599', + }, + { + symbol: 'WBTC', + name: 'Wrapped Bitcoin', + address: '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6', + isGivbackEligible: true, + networkId: NETWORK_IDS.POLYGON, + decimals: 18, + mainnetAddress: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', + }, +]; + +export class insertPolygonGivbackEligibleTokens1678950910841 + implements MigrationInterface +{ + async up(queryRunner: QueryRunner): Promise { + await queryRunner.manager.save( + Token, + polygonTokens.map(t => { + t.address = t.address?.toLowerCase(); + t.mainnetAddress = t.mainnetAddress?.toLowerCase(); + return t; + }), + ); + + const tokens = await queryRunner.query(` + SELECT * FROM token + WHERE "networkId" = ${NETWORK_IDS.POLYGON} AND symbol != 'MATIC' + `); + + const givethOrganization = ( + await queryRunner.query(`SELECT * FROM organization + WHERE label='giveth'`) + )[0]; + + const traceOrganization = ( + await queryRunner.query(`SELECT * FROM organization + WHERE label='trace'`) + )[0]; + + for (const token of tokens) { + // Relate all Polygon tokens to Giveth and Trace organizations + await queryRunner.query(`INSERT INTO organization_tokens_token ("tokenId","organizationId") VALUES + (${token.id}, ${givethOrganization.id}), + (${token.id}, ${traceOrganization.id}) + ;`); + } + } + + async down(queryRunner: QueryRunner): Promise { + const tokens = await queryRunner.query(` + SELECT * FROM token + WHERE "networkId" = ${NETWORK_IDS.POLYGON} AND symbol != 'MATIC' + `); + await queryRunner.query( + `DELETE FROM organization_tokens_token WHERE "tokenId" IN (${tokens + .map(token => token.id) + .join(',')})`, + ); + await queryRunner.query( + ` + DELETE from token + WHERE "networkId" = ${NETWORK_IDS.POLYGON} AND symbol != 'MATIC' + `, + ); + } +} From 493ed8c336b47c48ba7be334165338eda6495c7c Mon Sep 17 00:00:00 2001 From: Mohammad Ranjbar Z Date: Thu, 16 Mar 2023 16:51:25 +0330 Subject: [PATCH 2/7] Fix token page in adminjs to show organization relation related to #911 --- src/entities/token.ts | 5 ++++- src/server/adminBro.ts | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/entities/token.ts b/src/entities/token.ts index 87c2abb69..c159a38e8 100644 --- a/src/entities/token.ts +++ b/src/entities/token.ts @@ -53,6 +53,9 @@ export class Token extends BaseEntity { @Column({ nullable: false, default: false }) isGivbackEligible: boolean; - @ManyToMany(type => Organization, organization => organization.tokens) + @ManyToMany(type => Organization, organization => organization.tokens, { + // make it true to show organizations in token page of adminjs panel + eager: true, + }) organizations: Organization[]; } diff --git a/src/server/adminBro.ts b/src/server/adminBro.ts index 948ba196c..a1318a14e 100644 --- a/src/server/adminBro.ts +++ b/src/server/adminBro.ts @@ -949,6 +949,26 @@ const getAdminBroInstance = async () => { }, // Organization is not editable, hooks are not working correctly edit: { + before: async (request: AdminBroRequestInterface) => { + Object.keys(request?.payload).forEach(key => { + // because we made eager:true for token.organizations, if admin doesnt select organization + // the front will send something like + /** + * + 'organizations.0.id': '1', + 'organizations.0.name': 'Giveth', + 'organizations.0.label': 'giveth', + 'organizations.0.website': 'https://giveth.io', + 'organizations.0.supportCustomTokens': 'true', + */ + // in payload, and it make update query fail, so I delete all keys that starts with organizations. + if (key.includes('organizations.')) { + delete request?.payload[key]; + } + }); + + return request; + }, after: linkOrganizations, isAccessible: ({ currentAdmin }) => currentAdmin && currentAdmin.role === UserRole.ADMIN, @@ -3037,7 +3057,6 @@ export const linkOrganizations = async (request: AdminBroRequestInterface) => { DELETE FROM organization_tokens_token WHERE "tokenId" = ${token!.id} `); - const organizationsInDb = await Organization.createQueryBuilder( 'organization', ) @@ -3045,7 +3064,6 @@ export const linkOrganizations = async (request: AdminBroRequestInterface) => { labels: organizations.split(','), }) .getMany(); - token!.organizations = organizationsInDb; } From 296411864abcc0828b9d337cdf6910d0f3f81ce3 Mon Sep 17 00:00:00 2001 From: Carlos Quintero Date: Fri, 17 Mar 2023 09:30:25 -0500 Subject: [PATCH 3/7] update polygon token list and remove inconsistent ones --- ...-insert_polygon_givback_eligible_tokens.ts | 80 +++++++++---------- package-lock.json | 14 ++-- package.json | 2 +- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/migration/1678950910841-insert_polygon_givback_eligible_tokens.ts b/migration/1678950910841-insert_polygon_givback_eligible_tokens.ts index c4d30243c..ffc63813e 100644 --- a/migration/1678950910841-insert_polygon_givback_eligible_tokens.ts +++ b/migration/1678950910841-insert_polygon_givback_eligible_tokens.ts @@ -30,15 +30,15 @@ const polygonTokens = [ decimals: 18, mainnetAddress: '', }, - { - symbol: 'axlUSDC', - name: 'Axelar USDC', - address: '0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed', - isGivbackEligible: true, - networkId: NETWORK_IDS.POLYGON, - decimals: 18, - mainnetAddress: '', - }, + // { + // symbol: 'axlUSDC', + // name: 'Axelar USDC', + // address: '0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed', + // isGivbackEligible: true, + // networkId: NETWORK_IDS.POLYGON, + // decimals: 18, + // mainnetAddress: '', + // }, { symbol: 'BIFI', name: 'Beefy.Finance', @@ -46,7 +46,7 @@ const polygonTokens = [ isGivbackEligible: true, networkId: NETWORK_IDS.POLYGON, decimals: 18, - mainnetAddress: '0x2791BfD60D232150Bff86b39B7146c0eaAA2BA81', + mainnetAddress: '0x5870700f1272a1AdbB87C3140bD770880a95e55D', }, { symbol: 'DAI', @@ -75,15 +75,15 @@ const polygonTokens = [ decimals: 18, mainnetAddress: '0x853d955aCEf822Db058eb8505911ED77F175b99e', }, - { - symbol: 'KLIMA', - name: 'Klima DAO', - address: '0x4e78011Ce80ee02d2c3e649Fb657E45898257815', - isGivbackEligible: true, - networkId: NETWORK_IDS.POLYGON, - decimals: 18, - mainnetAddress: '', - }, + // { + // symbol: 'KLIMA', + // name: 'Klima DAO', + // address: '0x4e78011Ce80ee02d2c3e649Fb657E45898257815', + // isGivbackEligible: true, + // networkId: NETWORK_IDS.POLYGON, + // decimals: 18, + // mainnetAddress: '', + // }, { symbol: 'LDO', name: 'Lido DAO Token', @@ -103,32 +103,32 @@ const polygonTokens = [ mainnetAddress: '0x514910771AF9Ca656af840dff83E8264EcF986CA', }, { - symbol: 'MAI', + symbol: 'MIMATIC', name: 'Mai Finance', address: '0xa3Fa99A148fA48D14Ed51d610c367C61876997F1', isGivbackEligible: true, networkId: NETWORK_IDS.POLYGON, decimals: 18, - mainnetAddress: '', - }, - { - symbol: 'MANA', - name: 'Decentraland', - address: '0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4', - isGivbackEligible: true, - networkId: NETWORK_IDS.POLYGON, - decimals: 18, - mainnetAddress: '0x0F5D2fB29fb7d3CFeE444a200298f468908cC942', - }, - { - symbol: 'QI', - name: 'Qi Dao', - address: '0x580A84C73811E1839F75d86d75d88cCa0c241fF4', - isGivbackEligible: true, - networkId: NETWORK_IDS.POLYGON, - decimals: 18, - mainnetAddress: '', + mainnetAddress: '0x8d6cebd76f18e1558d4db88138e2defb3909fad6', }, + // { + // symbol: 'MANA', + // name: 'Decentraland', + // address: '0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4', + // isGivbackEligible: true, + // networkId: NETWORK_IDS.POLYGON, + // decimals: 18, + // mainnetAddress: '0x0F5D2fB29fb7d3CFeE444a200298f468908cC942', + // }, + // { + // symbol: 'QI', + // name: 'Qi Dao', + // address: '0x580A84C73811E1839F75d86d75d88cCa0c241fF4', + // isGivbackEligible: true, + // networkId: NETWORK_IDS.POLYGON, + // decimals: 18, + // mainnetAddress: '', + // }, { symbol: 'QUICK', name: 'Quickswap (NEW)', @@ -227,7 +227,7 @@ const polygonTokens = [ isGivbackEligible: true, networkId: NETWORK_IDS.POLYGON, decimals: 18, - mainnetAddress: '', + mainnetAddress: '0x8290333cef9e6d528dd5618fb97a76f268f3edd4', }, { symbol: 'stMATIC', diff --git a/package-lock.json b/package-lock.json index dc1f0dc46..ec239af1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@apollo/server": "4.3.1", "@apollo/server-plugin-landing-page-graphql-playground": "4.0.0", "@chainvine/sdk": "1.0.19", - "@giveth/monoswap": "^1.0.4", + "@giveth/monoswap": "1.1.2", "@sentry/node": "6.16.1", "@sentry/tracing": "^6.2.0", "@types/bcryptjs": "^2.4.2", @@ -3130,9 +3130,9 @@ } }, "node_modules/@giveth/monoswap": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@giveth/monoswap/-/monoswap-1.0.4.tgz", - "integrity": "sha512-PBgf6r30YPZQyZ6vgPGsrzDtZURzxfLRNrKwpkpUsryPXEGza4Mpj5+wU3TDrdMuA8wX3gCP0TwAXgoZh3vx1Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@giveth/monoswap/-/monoswap-1.1.2.tgz", + "integrity": "sha512-RyQfKp5qW268c8QFWe0pMLMyb1smGI1Mp8krQzfkZtSsCWvDlc+au3J1jFPxVf4z40XJJpK6CPeUGBY9ytE7Tg==", "dependencies": { "@bscswap/sdk": "^3.0.15", "@pancakeswap-libs/sdk": "^1.0.1", @@ -19161,9 +19161,9 @@ } }, "@giveth/monoswap": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@giveth/monoswap/-/monoswap-1.0.4.tgz", - "integrity": "sha512-PBgf6r30YPZQyZ6vgPGsrzDtZURzxfLRNrKwpkpUsryPXEGza4Mpj5+wU3TDrdMuA8wX3gCP0TwAXgoZh3vx1Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@giveth/monoswap/-/monoswap-1.1.2.tgz", + "integrity": "sha512-RyQfKp5qW268c8QFWe0pMLMyb1smGI1Mp8krQzfkZtSsCWvDlc+au3J1jFPxVf4z40XJJpK6CPeUGBY9ytE7Tg==", "requires": { "@bscswap/sdk": "^3.0.15", "@pancakeswap-libs/sdk": "^1.0.1", diff --git a/package.json b/package.json index 409b59690..c1e1e3921 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@apollo/server": "4.3.1", "@apollo/server-plugin-landing-page-graphql-playground": "4.0.0", "@chainvine/sdk": "1.0.19", - "@giveth/monoswap": "^1.0.4", + "@giveth/monoswap": "1.1.2", "@sentry/node": "6.16.1", "@sentry/tracing": "^6.2.0", "@types/bcryptjs": "^2.4.2", From 301a7ee93517c8ad4c8ab6cfd07418db660f2c5f Mon Sep 17 00:00:00 2001 From: Carlos Quintero Date: Fri, 17 Mar 2023 12:25:34 -0500 Subject: [PATCH 4/7] fix monoswap fetch query to use usdc for matic --- src/resolvers/donationResolver.ts | 3 +++ src/services/donationService.test.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/resolvers/donationResolver.ts b/src/resolvers/donationResolver.ts index c30aa6498..d8c7dd3f9 100644 --- a/src/resolvers/donationResolver.ts +++ b/src/resolvers/donationResolver.ts @@ -674,6 +674,9 @@ export class DonationResolver { case CHAIN_ID.XDAI: baseTokens = ['WXDAI', 'WETH']; break; + case CHAIN_ID.POLYGON: + baseTokens = ['USDC', 'MATIC']; + break; default: baseTokens = ['USDT', 'ETH']; break; diff --git a/src/services/donationService.test.ts b/src/services/donationService.test.ts index 109c5cb85..2157a544d 100644 --- a/src/services/donationService.test.ts +++ b/src/services/donationService.test.ts @@ -611,7 +611,7 @@ function fillOldStableCoinDonationsPriceTestCases() { donation, project, token, - ['USDT', 'MATIC'], + ['USDC', 'MATIC'], CHAIN_ID.POLYGON, amount, ); From 41dd94e6f44d887f665159b33eebd44b703136aa Mon Sep 17 00:00:00 2001 From: Carlos Quintero Date: Fri, 17 Mar 2023 13:31:01 -0500 Subject: [PATCH 5/7] add comment for matic tokens --- src/services/donationService.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/donationService.test.ts b/src/services/donationService.test.ts index 2157a544d..bdec88ac4 100644 --- a/src/services/donationService.test.ts +++ b/src/services/donationService.test.ts @@ -611,7 +611,7 @@ function fillOldStableCoinDonationsPriceTestCases() { donation, project, token, - ['USDC', 'MATIC'], + ['USDC', 'MATIC'], // For matic USDC returns more favorable values CHAIN_ID.POLYGON, amount, ); From c14c04272da9134f5c553802d2f44435fc00bfe2 Mon Sep 17 00:00:00 2001 From: Carlos Quintero Date: Fri, 17 Mar 2023 13:47:21 -0500 Subject: [PATCH 6/7] change usdc to usdt for test --- src/services/donationService.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/donationService.test.ts b/src/services/donationService.test.ts index bdec88ac4..251056612 100644 --- a/src/services/donationService.test.ts +++ b/src/services/donationService.test.ts @@ -611,7 +611,7 @@ function fillOldStableCoinDonationsPriceTestCases() { donation, project, token, - ['USDC', 'MATIC'], // For matic USDC returns more favorable values + ['USDT', 'MATIC'], // For matic USDC returns more favorable values CHAIN_ID.POLYGON, amount, ); From 330aeaf08baaca5339d7d6c789140e88e16c387e Mon Sep 17 00:00:00 2001 From: Carlos Quintero Date: Fri, 17 Mar 2023 14:07:45 -0500 Subject: [PATCH 7/7] update monoswap test and library --- package-lock.json | 2 +- package.json | 2 +- src/services/donationService.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ec239af1d..2588b564e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@apollo/server": "4.3.1", "@apollo/server-plugin-landing-page-graphql-playground": "4.0.0", "@chainvine/sdk": "1.0.19", - "@giveth/monoswap": "1.1.2", + "@giveth/monoswap": "^1.1.2", "@sentry/node": "6.16.1", "@sentry/tracing": "^6.2.0", "@types/bcryptjs": "^2.4.2", diff --git a/package.json b/package.json index c1e1e3921..463ac2ca9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@apollo/server": "4.3.1", "@apollo/server-plugin-landing-page-graphql-playground": "4.0.0", "@chainvine/sdk": "1.0.19", - "@giveth/monoswap": "1.1.2", + "@giveth/monoswap": "^1.1.2", "@sentry/node": "6.16.1", "@sentry/tracing": "^6.2.0", "@types/bcryptjs": "^2.4.2", diff --git a/src/services/donationService.test.ts b/src/services/donationService.test.ts index 251056612..bdec88ac4 100644 --- a/src/services/donationService.test.ts +++ b/src/services/donationService.test.ts @@ -611,7 +611,7 @@ function fillOldStableCoinDonationsPriceTestCases() { donation, project, token, - ['USDT', 'MATIC'], // For matic USDC returns more favorable values + ['USDC', 'MATIC'], // For matic USDC returns more favorable values CHAIN_ID.POLYGON, amount, );