Skip to content

Commit

Permalink
refactor InvalidWalletType error
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed May 30, 2023
1 parent 568cbf9 commit 3d94aed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
Expand Up @@ -81,7 +81,6 @@ module Test.Integration.Framework.TestData
, errMsgNotInDictionary
, errMsg400MinWithdrawalWrong
, errMsg403WithdrawalNotBeneficial
, errMsg403NotAShelleyWallet
, errMsg403MinUTxOValue
, errMsg403CouldntIdentifyAddrAsMine
, errMsg503PastHorizon
Expand Down Expand Up @@ -512,12 +511,6 @@ errMsg403WithdrawalNotBeneficial =
\either empty or doesn't have a balance big enough to deserve being \
\withdrawn. I won't proceed with that request."

errMsg403NotAShelleyWallet :: String
errMsg403NotAShelleyWallet =
"It is regrettable but you've just attempted an operation that is invalid \
\for this type of wallet. Only new 'Shelley' wallets can do something with \
\rewards and this one isn't."

errMsg403CouldntIdentifyAddrAsMine :: String
errMsg403CouldntIdentifyAddrAsMine = "I \
\couldn't identify this address as one of mine. It likely belongs to another wallet and I \
Expand Down
Expand Up @@ -1981,7 +1981,6 @@ spec = describe "SHARED_TRANSACTIONS" $ do

waitForNextEpoch ctx
waitForNextEpoch ctx
waitForNextEpoch ctx

eventually "party1: Wallet gets rewards from pool1" $ do
r <- request @ApiWallet ctx (Link.getWallet @'Shared party1) Default Empty
Expand Down Expand Up @@ -2286,7 +2285,7 @@ spec = describe "SHARED_TRANSACTIONS" $ do
eventually "Party2's wallet has quitted" $ do
rJoin' <- request @(ApiTransaction n) ctx
(Link.getTransaction @'Shared party2
(getFromResponse Prelude.id submittedTx3))
(getFromResponse Prelude.id submittedTx5))
Default Empty
verify rJoin'
[ expectResponseCode HTTP.status200
Expand Down
Expand Up @@ -158,7 +158,6 @@ import Test.Integration.Framework.TestData
, errMsg403EmptyUTxO
, errMsg403Fee
, errMsg403MinUTxOValue
, errMsg403NotAShelleyWallet
, errMsg403NotEnoughMoney
, errMsg403WithdrawalNotBeneficial
, errMsg403WrongPass
Expand Down Expand Up @@ -2287,8 +2286,8 @@ spec = describe "SHELLEY_TRANSACTIONS" $ do
(Link.createTransactionOld @'Byron wSelf) Default payload
verify rTx
[ expectResponseCode HTTP.status403
, expectErrorMessage errMsg403NotAShelleyWallet
]
decodeErrorInfo rTx `shouldBe` InvalidWalletType

it "SHELLEY_TX_REDEEM_06a - Can't redeem rewards if utxo = 0 from other" $
\ctx -> runResourceT $ do
Expand Down

0 comments on commit 3d94aed

Please sign in to comment.