@aurigami/sdk 0.6.7 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MoneyMarket.d.ts +1 -4
- package/dist/constants.d.ts +0 -1
- package/dist/sdk.cjs.development.js +78 -80
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +78 -80
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/MoneyMarket.ts +11 -21
- package/src/SDK.ts +2 -3
- package/src/constants.ts +21 -30
- package/src/decimals.ts +14 -13
- package/src/deployments/aurora_mainnet.json +28 -18
- package/src/deployments/aurora_testnet.json +28 -27
- package/src/priceFetcher.ts +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.7.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"typescript": "^4.5.4"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@aurigami/contracts": "2.
|
|
60
|
+
"@aurigami/contracts": "^2.2.1",
|
|
61
61
|
"axios": "^0.24.0",
|
|
62
62
|
"bignumber.js": "^9.0.2",
|
|
63
63
|
"dotenv": "^16.0.0",
|
package/src/MoneyMarket.ts
CHANGED
|
@@ -5,8 +5,7 @@ import AuErc20ABI from '@aurigami/contracts/artifacts/contracts/AuErc20.sol/AuEr
|
|
|
5
5
|
import AuETHABI from '@aurigami/contracts/artifacts/contracts/AuETH.sol/AuETH.json';
|
|
6
6
|
import ComptrollerABI from '@aurigami/contracts/artifacts/contracts/Comptroller.sol/Comptroller.json';
|
|
7
7
|
import AuriLensABI from '@aurigami/contracts/artifacts/contracts/AuriLens.sol/AuriLens.json';
|
|
8
|
-
import
|
|
9
|
-
import { AuErc20, AuETH, AuriLens, Comptroller, EthRepayHelper } from "@aurigami/contracts/typechain";
|
|
8
|
+
import { AuErc20, AuETH, AuriLens, Comptroller } from "@aurigami/contracts/typechain";
|
|
10
9
|
import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
11
10
|
import { networkAddresses, ETHAddress, ONE_YEAR, INF } from "./constants";
|
|
12
11
|
import BigNumber from "bignumber.js";
|
|
@@ -139,7 +138,7 @@ export class MoneyMarketRead extends BlockchainEntityRead {
|
|
|
139
138
|
await Promise.all(promises);
|
|
140
139
|
|
|
141
140
|
var borrowPlyApy = calcLMRewardApr(
|
|
142
|
-
calcValuation(
|
|
141
|
+
await calcValuation(
|
|
143
142
|
new TokenAmount(
|
|
144
143
|
PLYToken,
|
|
145
144
|
rewardSpeeds!.plyRewardBorrowSpeed.toString()
|
|
@@ -150,7 +149,7 @@ export class MoneyMarketRead extends BlockchainEntityRead {
|
|
|
150
149
|
ONE_YEAR
|
|
151
150
|
);
|
|
152
151
|
var depositPlyApy = calcLMRewardApr(
|
|
153
|
-
calcValuation(
|
|
152
|
+
await calcValuation(
|
|
154
153
|
new TokenAmount(
|
|
155
154
|
PLYToken,
|
|
156
155
|
rewardSpeeds!.plyRewardSupplySpeed.toString()
|
|
@@ -192,13 +191,6 @@ export class MoneyMarketRead extends BlockchainEntityRead {
|
|
|
192
191
|
}
|
|
193
192
|
|
|
194
193
|
export class MoneyMarketReadWrite extends MoneyMarketRead {
|
|
195
|
-
|
|
196
|
-
protected _EthRepayHelper: EthRepayHelper;
|
|
197
|
-
constructor(networkConnection: NetworkConnection, auToken: Address, underlyingAsset: Address) {
|
|
198
|
-
super(networkConnection, auToken, underlyingAsset);
|
|
199
|
-
this._EthRepayHelper = new Contract(networkAddresses.misc.ETHREPAYHELPER, EthRepayHelperABI.abi, networkConnection.provider) as EthRepayHelper;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
194
|
public async deposit(amount: TokenAmount): Promise<TransactionResponse> {
|
|
203
195
|
if (isSameAddress(amount.token.address, ETHAddress)) {
|
|
204
196
|
return (this.auToken as AuETH).connect(this._networkConnection.signer!).mint({value: amount.rawAmount()});
|
|
@@ -216,14 +208,16 @@ export class MoneyMarketReadWrite extends MoneyMarketRead {
|
|
|
216
208
|
return this.auToken.connect(this._networkConnection.signer!).redeemUnderlying(amount.rawAmount());
|
|
217
209
|
}
|
|
218
210
|
public async repay(amount: TokenAmount): Promise<TransactionResponse> {
|
|
211
|
+
var repayAmount: BN;
|
|
212
|
+
if (new BigNumber(amount.rawAmount()).lt(0)) {
|
|
213
|
+
repayAmount = INF;
|
|
214
|
+
} else {
|
|
215
|
+
repayAmount = BN.from(amount.rawAmount());
|
|
216
|
+
}
|
|
219
217
|
if (isSameAddress(amount.token.address, ETHAddress)) {
|
|
220
|
-
return this.
|
|
218
|
+
return (this.auToken as AuETH).connect(this._networkConnection.signer!).repayBorrow({value: repayAmount});
|
|
221
219
|
} else {
|
|
222
|
-
|
|
223
|
-
return this.auToken.connect(this._networkConnection.signer!).repayBorrow(INF);
|
|
224
|
-
} else {
|
|
225
|
-
return this.auToken.connect(this._networkConnection.signer!).repayBorrow(amount.rawAmount());
|
|
226
|
-
}
|
|
220
|
+
return (this.auToken as AuErc20).connect(this._networkConnection.signer!).repayBorrow(repayAmount);
|
|
227
221
|
}
|
|
228
222
|
}
|
|
229
223
|
public async enableCollateral(): Promise<TransactionResponse> {
|
|
@@ -246,8 +240,4 @@ export class MoneyMarket extends BlockchainEntity {
|
|
|
246
240
|
public read(networkConnection: NetworkConnection): MoneyMarketRead {
|
|
247
241
|
return new MoneyMarketRead(networkConnection, this.address, this.underlying);
|
|
248
242
|
}
|
|
249
|
-
|
|
250
|
-
public readWrite(networkConnection: NetworkConnection): MoneyMarketReadWrite {
|
|
251
|
-
return new MoneyMarketReadWrite(networkConnection, this.address, this.underlying);
|
|
252
|
-
}
|
|
253
243
|
}
|
package/src/SDK.ts
CHANGED
|
@@ -128,8 +128,7 @@ export class SdkRead extends BlockchainEntityRead {
|
|
|
128
128
|
for (var i = 0; i < marketCount; i ++) {
|
|
129
129
|
const auToken = networkAddresses.auTokens[i];
|
|
130
130
|
const moneyMarket: MoneyMarketRead = new MoneyMarketRead(this._networkConnection, auToken.address, auToken.underlying);
|
|
131
|
-
const
|
|
132
|
-
const maxWithdrawCap: BigNumber = borrowLimitMargin.div(userMarketDetails[i].collateralRatio).div(underlyingPrices[i]);
|
|
131
|
+
const maxWithdrawCap: BigNumber = (totalBorrowLimit.minus(minimumBorrowLimitAllowed)).div(userMarketDetails[i].collateralRatio).div(underlyingPrices[i]);
|
|
133
132
|
userMarketDetails[i].maxWithdrawableAmount = userMarketDetails[i].isCollateral && maxWithdrawCap.lt(userMarketDetails[i].depositBalance.formattedAmount())
|
|
134
133
|
? new TokenAmount(
|
|
135
134
|
moneyMarket.underlying,
|
|
@@ -255,7 +254,7 @@ export class SdkReadWrite extends SdkRead {
|
|
|
255
254
|
);
|
|
256
255
|
}
|
|
257
256
|
public async stake(amount: TokenAmount): Promise<TransactionResponse> {
|
|
258
|
-
return this._auriFairLaunch.connect(this._networkConnection.signer!).deposit(AurPlyPid, amount.rawAmount());
|
|
257
|
+
return this._auriFairLaunch.connect(this._networkConnection.signer!).deposit(AurPlyPid, amount.rawAmount(), false);
|
|
259
258
|
}
|
|
260
259
|
public async unstake(amount: TokenAmount): Promise<TransactionResponse> {
|
|
261
260
|
return this._auriFairLaunch.connect(this._networkConnection.signer!).withdraw(AurPlyPid, amount.rawAmount());
|
package/src/constants.ts
CHANGED
|
@@ -9,7 +9,6 @@ export const DECIMAL_PRECISION = 10;
|
|
|
9
9
|
|
|
10
10
|
export type NetworkAddresses = {
|
|
11
11
|
auTokens: {
|
|
12
|
-
name: string,
|
|
13
12
|
address: string,
|
|
14
13
|
underlying: string
|
|
15
14
|
}[],
|
|
@@ -19,53 +18,45 @@ export type NetworkAddresses = {
|
|
|
19
18
|
export const networkAddresses: NetworkAddresses = {
|
|
20
19
|
auTokens: [
|
|
21
20
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
underlying: '0xe1Db3E2f129539b2399d8Cd9e808305c85f0c82f'.toLowerCase()
|
|
21
|
+
address: '0x7D9F7B4734E274Ff10531bBD5aE8fE6069164d28'.toLowerCase(),
|
|
22
|
+
underlying: '0xb12bfca5a55806aaf64e99521918a4bf0fc40802'.toLowerCase()
|
|
25
23
|
},
|
|
26
24
|
{
|
|
27
|
-
|
|
28
|
-
address: '0x0e2E6069231928429F36dCA288466bC738e602b3'.toLowerCase(),
|
|
25
|
+
address: '0x580Ac375176A4e9B26977490656c3B2F00Abf624'.toLowerCase(),
|
|
29
26
|
underlying: ETHAddress.toLowerCase()
|
|
30
27
|
},
|
|
31
28
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
underlying: '0xA69506eAbdC11BBdAf2259882A02a91B66E6d7E1'.toLowerCase()
|
|
29
|
+
address: '0x705b9d83222c4EeDeaD1A0E399cDeB917173E1F6'.toLowerCase(),
|
|
30
|
+
underlying: '0xf4eb217ba2454613b15dbdea6e5f22276410e89e'.toLowerCase()
|
|
35
31
|
},
|
|
36
32
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
underlying: '0x4459ED2dEFFe0569AE748aD5D7cFEFDeeF667E87'.toLowerCase()
|
|
33
|
+
address: '0xF9739783b767b358b21A1373140296c09271d6F5'.toLowerCase(),
|
|
34
|
+
underlying: '0x4988a896b1227218e4a686fde5eabdcabd91571f'.toLowerCase()
|
|
40
35
|
},
|
|
41
36
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
underlying: '0x1c9998C7768517b83136d3b237a31bc69eDc9028'.toLowerCase()
|
|
37
|
+
address: '0x4d2c286D74597B13642dd311D1050dFf9E7eF666'.toLowerCase(),
|
|
38
|
+
underlying: '0xe3520349f477a5f6eb06107066048508498a291b'.toLowerCase()
|
|
45
39
|
},
|
|
46
40
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
underlying: '0x3cD388c98FE71fE1a37272279F4b50bF27037E23'.toLowerCase()
|
|
41
|
+
address: '0x367E3fD10006bC64D279e5F1F499DcfA92518A35'.toLowerCase(),
|
|
42
|
+
underlying: '0x07a4f270836F2B2B5CACb00b09552e690276aC33'.toLowerCase()
|
|
50
43
|
},
|
|
51
44
|
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
underlying: '0x01B2EDff9b095DC270beca46E2eFB41a3ecEE169'.toLowerCase()
|
|
45
|
+
address: '0x7FDe6C1C53DD4E94a8CD4c60BF1418613c90c42F'.toLowerCase(),
|
|
46
|
+
underlying: '0xC42C30aC6Cc15faC9bD938618BcaA1a1FaE8501d'.toLowerCase()
|
|
55
47
|
}
|
|
56
48
|
],
|
|
57
49
|
misc: {
|
|
58
|
-
COMPTROLLER: "
|
|
59
|
-
oracle: "
|
|
60
|
-
AURIFAIRLAUNCH: "
|
|
61
|
-
AURILENS: '
|
|
62
|
-
TOKENLOCK: '
|
|
63
|
-
FAUCET:
|
|
64
|
-
ETHREPAYHELPER: "0x0b28E2F1767623f2D5Cd59165e79f83E3D63b71F".toLowerCase()
|
|
50
|
+
COMPTROLLER: "0xc77877b0bd08fE3B060EbD8AEE06fb560C91A125".toLowerCase(),
|
|
51
|
+
oracle: "0xde76c82a6F99D25bEd226af44cF427e57dE8eE93".toLowerCase(),
|
|
52
|
+
AURIFAIRLAUNCH: "0x660159696c9E0B2c17E3e0ac2019F436aE34fc7A".toLowerCase(),
|
|
53
|
+
AURILENS: '0x503bD4B6a056F7E66671D2B4620f0aDC4ff2A4e9'.toLowerCase(),
|
|
54
|
+
TOKENLOCK: '0xa4623FC7C96B59f9a0a46144324d68C8E8710966'.toLowerCase(),
|
|
55
|
+
FAUCET: '0x8F791d611D71699B76C03857A51D7B7E5E66f01E'.toLowerCase() // doesn't exist on mainnet
|
|
65
56
|
},
|
|
66
57
|
tokens: {
|
|
67
|
-
AURORA:
|
|
68
|
-
PLY: "
|
|
58
|
+
AURORA: "0x8bec47865ade3b172a928df8f990bc7f2a3b9f79".toLowerCase(),
|
|
59
|
+
PLY: "0x07a4f270836F2B2B5CACb00b09552e690276aC33".toLowerCase(),
|
|
69
60
|
AURPLY: dummyAddress.toLowerCase() // This is dummy
|
|
70
61
|
}
|
|
71
62
|
}
|
package/src/decimals.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
export const decimalRecords: Record<string, number> = {
|
|
2
2
|
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 18,
|
|
3
|
-
'
|
|
4
|
-
'
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
3
|
+
'0x8bec47865ade3b172a928df8f990bc7f2a3b9f79': 18,
|
|
4
|
+
'0x4988a896b1227218e4a686fde5eabdcabd91571f': 6,
|
|
5
|
+
'0xb12bfca5a55806aaf64e99521918a4bf0fc40802': 6,
|
|
6
|
+
'0x7fde6c1c53dd4e94a8cd4c60bf1418613c90c42f': 8,
|
|
7
|
+
'0xe3520349f477a5f6eb06107066048508498a291b': 18,
|
|
8
|
+
'0xf9739783b767b358b21a1373140296c09271d6f5': 8,
|
|
9
|
+
'0x07a4f270836f2b2b5cacb00b09552e690276ac33': 18,
|
|
10
|
+
'0xf4eb217ba2454613b15dbdea6e5f22276410e89e': 8,
|
|
11
|
+
'0x705b9d83222c4eedead1a0e399cdeb917173e1f6': 8,
|
|
12
|
+
'0x367e3fd10006bc64d279e5f1f499dcfa92518a35': 8,
|
|
13
|
+
'0x580ac375176a4e9b26977490656c3b2f00abf624': 8,
|
|
14
|
+
'0x4d2c286d74597b13642dd311d1050dff9e7ef666': 8,
|
|
15
|
+
'0x7d9f7b4734e274ff10531bbd5ae8fe6069164d28': 8,
|
|
16
|
+
'0xc42c30ac6cc15fac9bd938618bcaa1a1fae8501d': 24
|
|
16
17
|
}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"comptroller": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
2
|
+
"networkId": 1313161554,
|
|
3
|
+
"deployer": "0xf5FDd938B6BE0a0E6800262b3F623FE26c098410",
|
|
4
|
+
"unitroller": "0xc77877b0bd08fE3B060EbD8AEE06fb560C91A125",
|
|
5
|
+
"comptroller": "0x2082a661FCe093F1DEDd1842e79b9f95e68bb39B",
|
|
6
|
+
"ply": "0x07a4f270836F2B2B5CACb00b09552e690276aC33",
|
|
7
|
+
"tokenLock": "0xa4623FC7C96B59f9a0a46144324d68C8E8710966",
|
|
8
|
+
"lens": "0x503bD4B6a056F7E66671D2B4620f0aDC4ff2A4e9",
|
|
9
|
+
"fairLaunch": "0x660159696c9E0B2c17E3e0ac2019F436aE34fc7A",
|
|
10
|
+
"oracle": "0xde76c82a6F99D25bEd226af44cF427e57dE8eE93",
|
|
11
|
+
"interestRateModel": "0x70787df7735d736E20E06DBdc41B8455B98cc1e5",
|
|
9
12
|
"auTokens": {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
"USDC": "0x7D9F7B4734E274Ff10531bBD5aE8fE6069164d28",
|
|
14
|
+
"ETH": "0x580Ac375176A4e9B26977490656c3B2F00Abf624",
|
|
15
|
+
"WBTC": "0x705b9d83222c4EeDeaD1A0E399cDeB917173E1F6",
|
|
16
|
+
"USDT": "0xF9739783b767b358b21A1373140296c09271d6F5",
|
|
17
|
+
"DAI": "0x4d2c286D74597B13642dd311D1050dFf9E7eF666",
|
|
18
|
+
"PLY": "0x367E3fD10006bC64D279e5F1F499DcfA92518A35",
|
|
19
|
+
"WNEAR": "0x7FDe6C1C53DD4E94a8CD4c60BF1418613c90c42F"
|
|
17
20
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
"supportedTokens": {
|
|
22
|
+
"USDC": "0xb12bfca5a55806aaf64e99521918a4bf0fc40802",
|
|
23
|
+
"WBTC": "0xf4eb217ba2454613b15dbdea6e5f22276410e89e",
|
|
24
|
+
"USDT": "0x4988a896b1227218e4a686fde5eabdcabd91571f",
|
|
25
|
+
"DAI": "0xe3520349f477a5f6eb06107066048508498a291b",
|
|
26
|
+
"PLY": "0x07a4f270836F2B2B5CACb00b09552e690276aC33",
|
|
27
|
+
"WNEAR": "0xC42C30aC6Cc15faC9bD938618BcaA1a1FaE8501d"
|
|
28
|
+
},
|
|
29
|
+
"PLY_AUR_LP": "",
|
|
30
|
+
"faucet": "0xA3923309CF9069b4945Dec09c760b70fC53373Db"
|
|
31
|
+
}
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"comptroller": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
2
|
+
"networkId": 1313161555,
|
|
3
|
+
"deployer": "0x42D2D78Cc14e1B7D5e317B42e5335D8816B4Fd3F",
|
|
4
|
+
"unitroller": "0x1626d7941DF19781657a921014597c449F86941e",
|
|
5
|
+
"comptroller": "0x06200C8331193241e6487235C1E8a1340fcc9C1A",
|
|
6
|
+
"ply": "0x84B5C41DC786316c5aA319B5A22CA77472e1d31f",
|
|
7
|
+
"tokenLock": "0xc77E562C41ec3Ce860b5424758B77ad0aDb1bB93",
|
|
8
|
+
"lens": "0x680e15080Df9ff61131499D21aa5Ca9Bd05E60e0",
|
|
9
|
+
"fairLaunch": "0x4e91CdfeA23f44D4269E66494fe532867a0fAe5E",
|
|
10
|
+
"oracle": "0xe0E2Bb669a75Ae2384371cB4c4c95ff6fC1581b0",
|
|
11
|
+
"interestRateModel": "0x7346c735bce0c4838A917AFa9879F7723f1bB963",
|
|
9
12
|
"auTokens": {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
"USDC": "0x1c7EB2ADdC2df2F28E9631cce970D2E2DF22429A",
|
|
14
|
+
"ETH": "0xdaE860b77c26498e7Bd8e16Fb80AD572FaB9688f",
|
|
15
|
+
"WBTC": "0x5329f32A9dDaC3d274Cc670B284561b0086D2244",
|
|
16
|
+
"USDT": "0x57E15Bf9Bc4c8a7AFd3C8DBE153ED29eC90B68Fa",
|
|
17
|
+
"DAI": "0xdCdA4c7eF408961200193d7180357AEC404C267A",
|
|
18
|
+
"PLY": "0xa8474c18f502551937367120a6D8453dA785f1DD",
|
|
19
|
+
"WNEAR": "0x2Db190F0Db94E78B87D805e022D2a07803652211"
|
|
17
20
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}
|
|
21
|
+
"supportedTokens": {
|
|
22
|
+
"USDC": "0x3dcB6AdF46E4d854E94719b6ed9cfab6939cC1Cb",
|
|
23
|
+
"WBTC": "0x6fF98E346Ba4C56fBc3Ebc3f92477ffCe09D96AB",
|
|
24
|
+
"USDT": "0x05b8777B6c280DB4E61CF0F63d59b4Ac8ec70538",
|
|
25
|
+
"DAI": "0xd94951E6B276fD4327FFBD3253b6307d112403e2",
|
|
26
|
+
"PLY": "0x84B5C41DC786316c5aA319B5A22CA77472e1d31f",
|
|
27
|
+
"WNEAR": "0xb2cBCe33a6fb7D2efFb1cF73A654a4c0c9255874"
|
|
28
|
+
},
|
|
29
|
+
"PLY_AUR_LP": "",
|
|
30
|
+
"faucet": "0x8F791d611D71699B76C03857A51D7B7E5E66f01E"
|
|
31
|
+
}
|
package/src/priceFetcher.ts
CHANGED
|
@@ -101,7 +101,7 @@ export async function fetchPrice(address: Address, provider: providers.Provider)
|
|
|
101
101
|
});
|
|
102
102
|
if (matchingAuToken !== undefined) {
|
|
103
103
|
return fetchPriceFromOracle(matchingAuToken.address, getDecimal(address), provider);
|
|
104
|
-
} else if (isSameAddress(address, networkAddresses.
|
|
104
|
+
} else if (isSameAddress(address, networkAddresses.misc.AUPLYLP)) {
|
|
105
105
|
return fetchLPPrice(address, provider);
|
|
106
106
|
} else {
|
|
107
107
|
return fetchPriceFromCoingecko(address);
|