From b7cb87cfb840fc3c92ecabe49f43ad7667503871 Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 12 Feb 2024 13:35:00 +0000 Subject: [PATCH] use lend vault params Signed-off-by: Gregory Hill --- scripts/register-asset.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/register-asset.ts b/scripts/register-asset.ts index 562f2eaa..a318e73f 100644 --- a/scripts/register-asset.ts +++ b/scripts/register-asset.ts @@ -88,6 +88,7 @@ const NEW_ASSET = { function vaultRegistryCalls( api: ApiPromise, collateralCurrency: { ForeignAsset: number } | { LendToken: number }, + vaultParams: any, ) { const { wrappedCurrency, @@ -96,7 +97,7 @@ function vaultRegistryCalls( secureCollateral, minimumCollateral, systemCollateralCeiling - } = NEW_ASSET.vaultParams; + } = vaultParams; const currencyPair = { collateral: collateralCurrency, wrapped: wrappedCurrency, @@ -133,10 +134,10 @@ async function main(): Promise { paraApi.tx.loans.activateMarket(currencyId) ]); - allCalls.push(...vaultRegistryCalls(paraApi, currencyId)); + allCalls.push(...vaultRegistryCalls(paraApi, currencyId, NEW_ASSET.vaultParams)); const lendCurrencyId = NEW_ASSET.market.lendTokenId; - allCalls.push(...vaultRegistryCalls(paraApi, lendCurrencyId)); + allCalls.push(...vaultRegistryCalls(paraApi, lendCurrencyId, NEW_ASSET.lendVaultParams)); const batched = paraApi.tx.utility.batchAll(allCalls);