From e85dd4f0bb7424b3f4a3e67f5d38b0f053df5655 Mon Sep 17 00:00:00 2001 From: JP Angelle Date: Thu, 31 Aug 2023 14:48:32 -0500 Subject: [PATCH] remove price feed on finance --- centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx | 9 +-------- centrifuge-js/src/modules/pools.ts | 8 +++----- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx b/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx index 03a7cea6e0..bc6af21a19 100644 --- a/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx +++ b/centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx @@ -63,14 +63,7 @@ export function ExternalFinanceForm({ loan }: { loan: LoanType }) { const price = CurrencyBalance.fromFloat(values.price, pool.currency.decimals) const faceValue = CurrencyBalance.fromFloat(values.faceValue, 18) - doFinanceTransaction([ - loan.poolId, - loan.id, - faceValue, - price, - (loan.pricing as ExternalPricingInfo).Isin, - account.actingAddress, - ]) + doFinanceTransaction([loan.poolId, loan.id, faceValue, price, account.actingAddress]) actions.setSubmitting(false) }, validateOnMount: true, diff --git a/centrifuge-js/src/modules/pools.ts b/centrifuge-js/src/modules/pools.ts index 61cc2a934c..015756187b 100644 --- a/centrifuge-js/src/modules/pools.ts +++ b/centrifuge-js/src/modules/pools.ts @@ -1341,10 +1341,10 @@ export function getPoolsModule(inst: Centrifuge) { } function financeExternalLoan( - args: [poolId: string, loanId: string, quantity: BN, price: BN, isin: string, aoProxy: string], + args: [poolId: string, loanId: string, quantity: BN, price: BN, aoProxy: string], options?: TransactionOptions ) { - const [poolId, loanId, quantity, price, isin, aoProxy] = args + const [poolId, loanId, quantity, price, aoProxy] = args const $api = inst.getApi() return $api.pipe( switchMap((api) => { @@ -1355,9 +1355,7 @@ export function getPoolsModule(inst: Centrifuge) { external: { quantity: quantity.toString(), settlementPrice: price.toString() }, }) ) - const oracleFeedSubmittable = api.tx.priceOracle.feedValues([[{ Isin: isin }, price]]) - const batchSubmittable = api.tx.utility.batchAll([oracleFeedSubmittable, borrowSubmittable]) - return inst.wrapSignAndSend(api, batchSubmittable, options) + return inst.wrapSignAndSend(api, borrowSubmittable, options) }) ) }