Skip to content

Commit

Permalink
feat: add fee arguments to setup vault
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Oct 22, 2024
1 parent 857107e commit 98b2804
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
10 changes: 9 additions & 1 deletion src/network-handlers/ripple-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,22 @@ export class RippleHandler {
}
}

async setupVault(uuid: string, userAddress: string, timeStamp: number): Promise<string> {
async setupVault(
uuid: string,
userAddress: string,
timeStamp: number,
btcMintFeeBasisPoints: number,
btcRedeemFeeBasisPoints: number
): Promise<string> {
try {
await connectRippleClient(this.client);

const newVault = buildDefaultNftVault();
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}`);
Expand Down

0 comments on commit 98b2804

Please sign in to comment.