Skip to content

Commit bc23439

Browse files
committed
Revert "fix: remove is quioted from ca"
This reverts commit f6f302d.
1 parent f6f302d commit bc23439

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/core/creditAccount.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export class CreditAccountData {
169169
readonly collateralTokens: Array<Address> = [];
170170
readonly allBalances: Record<Address, CaTokenBalance> = {};
171171
readonly forbiddenTokens: Record<Address, true> = {};
172+
readonly quotedTokens: Record<Address, true> = {};
172173

173174
constructor(payload: CreditAccountDataPayload) {
174175
this.isSuccessful = payload.isSuccessful;
@@ -215,6 +216,7 @@ export class CreditAccountData {
215216
balance: b.balance,
216217
isForbidden: b.isForbidden,
217218
isEnabled: b.isEnabled,
219+
isQuoted: b.isQuoted,
218220
quota: b.quota,
219221
quotaRate: BigInt(b.quotaRate) * PERCENTAGE_DECIMALS,
220222
};
@@ -226,6 +228,9 @@ export class CreditAccountData {
226228
if (b.isForbidden) {
227229
this.forbiddenTokens[token] = true;
228230
}
231+
if (b.isQuoted) {
232+
this.quotedTokens[token] = true;
233+
}
229234

230235
this.allBalances[token] = balance;
231236
});
@@ -332,6 +337,10 @@ export class CreditAccountData {
332337
return !!this.forbiddenTokens[token];
333338
}
334339

340+
isQuoted(token: Address) {
341+
return !!this.quotedTokens[token];
342+
}
343+
335344
isTokenEnabled(token: Address) {
336345
return this.allBalances[token].isEnabled;
337346
}

src/payload/creditAccount.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export interface CaTokenBalance {
55
balance: bigint;
66
isForbidden: boolean;
77
isEnabled: boolean;
8+
isQuoted: boolean;
89
quota: bigint;
910
quotaRate: bigint;
1011
}

0 commit comments

Comments
 (0)