Skip to content

Commit

Permalink
test(core): make limits error checks more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
vindard committed Nov 29, 2023
1 parent b695d2f commit e52058a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/api/test/integration/app/wallets/send-onchain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import { toCents, UsdDisplayCurrency } from "@/domain/fiat"
import {
InactiveAccountError,
InsufficientBalanceError,
IntraledgerLimitsExceededError,
LessThanDustThresholdError,
LimitsExceededError,
SelfPaymentError,
TradeIntraAccountLimitsExceededError,
WithdrawalLimitsExceededError,
} from "@/domain/errors"
import { SubOneCentSatAmountForUsdSelfSendError } from "@/domain/payments"
import {
Expand Down Expand Up @@ -225,7 +227,7 @@ describe("onChainPay", () => {
memo,
})

expect(result).toBeInstanceOf(LimitsExceededError)
expect(result).toBeInstanceOf(WithdrawalLimitsExceededError)
})

it("fails if has insufficient balance for fee", async () => {
Expand Down Expand Up @@ -440,7 +442,7 @@ describe("onChainPay", () => {
memo,
})

expect(result).toBeInstanceOf(LimitsExceededError)
expect(result).toBeInstanceOf(IntraledgerLimitsExceededError)
})

it("fails if trade-intra-account limit hit", async () => {
Expand Down Expand Up @@ -502,7 +504,7 @@ describe("onChainPay", () => {
memo,
})

expect(result).toBeInstanceOf(LimitsExceededError)
expect(result).toBeInstanceOf(TradeIntraAccountLimitsExceededError)
})

it("fails if recipient account is locked", async () => {
Expand Down

0 comments on commit e52058a

Please sign in to comment.