Skip to content

Commit d96a45e

Browse files
committed
chore(fast-usdc): prune testBorrow, testRepay methods
1 parent aa7a476 commit d96a45e

File tree

1 file changed

+5
-39
lines changed

1 file changed

+5
-39
lines changed

packages/fast-usdc/src/fast-usdc.contract.js

+5-39
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { AssetKind } from '@agoric/ertp';
2-
import {
3-
assertAllDefined,
4-
deeplyFulfilledObject,
5-
makeTracer,
6-
} from '@agoric/internal';
2+
import { assertAllDefined, makeTracer } from '@agoric/internal';
73
import { observeIteration, subscribeEach } from '@agoric/notifier';
84
import {
95
CosmosChainInfoShape,
@@ -12,20 +8,19 @@ import {
128
registerChainsAndAssets,
139
withOrchestration,
1410
} from '@agoric/orchestration';
11+
import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js';
1512
import { provideSingleton } from '@agoric/zoe/src/contractSupport/durability.js';
1613
import { prepareRecorderKitMakers } from '@agoric/zoe/src/contractSupport/recorder.js';
17-
import { makeZoeTools } from '@agoric/orchestration/src/utils/zoe-tools.js';
18-
import { depositToSeat } from '@agoric/zoe/src/contractSupport/zoeHelpers.js';
1914
import { E } from '@endo/far';
20-
import { M, objectMap } from '@endo/patterns';
15+
import { M } from '@endo/patterns';
2116
import { prepareAdvancer } from './exos/advancer.js';
2217
import { prepareLiquidityPoolKit } from './exos/liquidity-pool.js';
2318
import { prepareSettler } from './exos/settler.js';
2419
import { prepareStatusManager } from './exos/status-manager.js';
2520
import { prepareTransactionFeedKit } from './exos/transaction-feed.js';
26-
import { defineInertInvitation } from './utils/zoe.js';
27-
import { FastUSDCTermsShape, FeeConfigShape } from './type-guards.js';
2821
import * as flows from './fast-usdc.flows.js';
22+
import { FastUSDCTermsShape, FeeConfigShape } from './type-guards.js';
23+
import { defineInertInvitation } from './utils/zoe.js';
2924

3025
const trace = makeTracer('FastUsdc');
3126

@@ -151,35 +146,6 @@ export const contract = async (zcf, privateArgs, zone, tools) => {
151146
async makeOperatorInvitation(operatorId) {
152147
return feedKit.creator.makeOperatorInvitation(operatorId);
153148
},
154-
/**
155-
* @param {{ USDC: Amount<'nat'>}} amounts
156-
*/
157-
testBorrow(amounts) {
158-
console.log('🚧🚧 UNTIL: borrow is integrated (#10388) 🚧🚧', amounts);
159-
const { zcfSeat: tmpAssetManagerSeat } = zcf.makeEmptySeatKit();
160-
poolKit.borrower.borrow(tmpAssetManagerSeat, amounts);
161-
return tmpAssetManagerSeat.getCurrentAllocation();
162-
},
163-
/**
164-
*
165-
* @param {RepayAmountKWR} amounts
166-
* @param {RepayPaymentKWR} payments
167-
* @returns {Promise<AmountKeywordRecord>}
168-
*/
169-
async testRepay(amounts, payments) {
170-
console.log('🚧🚧 UNTIL: repay is integrated (#10388) 🚧🚧', amounts);
171-
const { zcfSeat: tmpAssetManagerSeat } = zcf.makeEmptySeatKit();
172-
await depositToSeat(
173-
zcf,
174-
tmpAssetManagerSeat,
175-
await deeplyFulfilledObject(
176-
objectMap(payments, pmt => E(terms.issuers.USDC).getAmountOf(pmt)),
177-
),
178-
payments,
179-
);
180-
poolKit.repayer.repay(tmpAssetManagerSeat, amounts);
181-
return tmpAssetManagerSeat.getCurrentAllocation();
182-
},
183149
});
184150

185151
const publicFacet = zone.exo('Fast USDC Public', undefined, {

0 commit comments

Comments
 (0)