From 98b2804e4dd17e64b48852ffa887743ab299b5d0 Mon Sep 17 00:00:00 2001 From: Polybius93 Date: Tue, 22 Oct 2024 12:02:08 +0200 Subject: [PATCH] feat: add fee arguments to setup vault --- package.json | 2 +- src/network-handlers/ripple-handler.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 63cbfc5..59d2b0b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "dlc-btc-lib", - "version": "2.4.6", + "version": "2.4.7", "description": "This library provides a comprehensive set of interfaces and functions for minting dlcBTC tokens on supported blockchains.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/network-handlers/ripple-handler.ts b/src/network-handlers/ripple-handler.ts index e5f549a..497db17 100644 --- a/src/network-handlers/ripple-handler.ts +++ b/src/network-handlers/ripple-handler.ts @@ -133,7 +133,13 @@ export class RippleHandler { } } - async setupVault(uuid: string, userAddress: string, timeStamp: number): Promise { + async setupVault( + uuid: string, + userAddress: string, + timeStamp: number, + btcMintFeeBasisPoints: number, + btcRedeemFeeBasisPoints: number + ): Promise { try { await connectRippleClient(this.client); @@ -141,6 +147,8 @@ export class RippleHandler { newVault.uuid = uuid; newVault.creator = userAddress; newVault.timestamp = BigNumber.from(timeStamp); + newVault.btcMintFeeBasisPoints = BigNumber.from(btcMintFeeBasisPoints); + newVault.btcRedeemFeeBasisPoints = BigNumber.from(btcRedeemFeeBasisPoints); return await this.mintNFT(newVault); } catch (error) { throw new RippleError(`Could not setup Ripple Vault: ${error}`);