Add courtesyCall -> awaitingWithdrawalSignature state test transition
Without this transition, state tests could not verify the scenario where
a deposit was redeemed from a courtesy call state. This scenario has
subtly different characteristics, like the fact that the cost to the
redeemer is reduced.
@@ -712,6 +712,27 @@ module.exports = {
)
},
},
+ awaitingWithdrawalSignature: {
+ transition: async (state) => {
+ const { deposit } = state
+ await System.setAndApproveRedemptionBalance(state)
+
+ return {
+ state: "active",
+ tx: deposit.requestRedemption(
+ depositRoundTrip.redemptionTx.outputValueBytes,
+ depositRoundTrip.redemptionTx.outputScript,
+ { from: opener },
+ )
+ }
+ },
+ expect: async (_, receipt, { deposit }) => {
+ expectEvent(receipt, "RedemptionRequested")
+ expect(await deposit.currentState()).to.eq.BN(
+ System.States.AWAITING_WITHDRAWAL_SIGNATURE
+ )
+ },
+ },
liquidationInProgress: {
after: System.courtesyTimeout,
transition: async (state) => {
