Skip to content

Commit

Permalink
Added BTC with Satoshi (#817)
Browse files Browse the repository at this point in the history
Fixes #759 

Display maximum redemption amount in BTC with Satoshi
  • Loading branch information
mhluongo authored Aug 23, 2024
2 parents e0a0bd4 + 8463374 commit 5b251c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion typescript/src/services/redemptions/redemptions-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ export class RedemptionsService {

if (!walletData)
throw new Error(
`Could not find a wallet with enough funds. Maximum redemption amount is ${maxAmount} Satoshi.`
`Could not find a wallet with enough funds. Maximum redemption amount is ${maxAmount} Satoshi ( ${maxAmount.div(
BigNumber.from(1e8)
)} BTC ) .`
)

return walletData
Expand Down
4 changes: 3 additions & 1 deletion typescript/test/services/redemptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ describe("Redemptions", () => {
amount
)
).to.be.rejectedWith(
`Could not find a wallet with enough funds. Maximum redemption amount is ${expectedMaxAmount.toString()} Satoshi.`
`Could not find a wallet with enough funds. Maximum redemption amount is ${expectedMaxAmount.toString()} Satoshi ( ${expectedMaxAmount.div(
BigNumber.from(1e8)
)} BTC ) `
)
})
}
Expand Down

0 comments on commit 5b251c6

Please sign in to comment.