@@ -123,7 +123,8 @@ spec = describe "Accounts" $ do
123
123
monadicIO $ do
124
124
wId <- pick arbitrary
125
125
withLayer $ \ layer _ -> do
126
- res <- (WalletLayer. _pwlDeleteAccount layer) wId 100
126
+ res <- WalletLayer. _pwlDeleteAccount layer wId
127
+ (V1. unsafeMkAccountIndex 100 )
127
128
case res of
128
129
Left (WalletLayer. DeleteAccountError
129
130
(V1 (Kernel. UnknownHdAccountRoot _))) ->
@@ -139,7 +140,9 @@ spec = describe "Accounts" $ do
139
140
prop " fails if the account doesn't exists" $ withMaxSuccess 50 $ do
140
141
monadicIO $ do
141
142
withFixture $ \ _ layer _ Fixture {.. } -> do
142
- res <- (WalletLayer. _pwlDeleteAccount layer) (V1. walId fixtureV1Wallet) 100
143
+ res <- WalletLayer. _pwlDeleteAccount layer
144
+ (V1. walId fixtureV1Wallet)
145
+ (V1. unsafeMkAccountIndex 100 )
143
146
case res of
144
147
Left (WalletLayer. DeleteAccountError
145
148
(V1 (Kernel. UnknownHdAccount _))) ->
@@ -170,7 +173,9 @@ spec = describe "Accounts" $ do
170
173
monadicIO $ do
171
174
wId <- pick arbitrary
172
175
withLayer $ \ layer _ -> do
173
- let delete = Handlers. deleteAccount layer wId 100
176
+ let delete = Handlers. deleteAccount layer
177
+ wId
178
+ (V1. unsafeMkAccountIndex 100 )
174
179
res <- try . runExceptT . runHandler' $ delete
175
180
case res of
176
181
Left (_e :: WalletLayer. DeleteAccountError ) -> return ()
@@ -180,7 +185,10 @@ spec = describe "Accounts" $ do
180
185
prop " Servant handler fails if the account doesn't exist" $ withMaxSuccess 50 $ do
181
186
monadicIO $ do
182
187
withFixture $ \ _ layer _ Fixture {.. } -> do
183
- let delete = Handlers. deleteAccount layer (V1. walId fixtureV1Wallet) 100
188
+ let delete =
189
+ Handlers. deleteAccount layer
190
+ (V1. walId fixtureV1Wallet)
191
+ (V1. unsafeMkAccountIndex 100 )
184
192
res <- try . runExceptT . runHandler' $ delete
185
193
case res of
186
194
Left (_e :: WalletLayer. DeleteAccountError ) -> return ()
@@ -207,7 +215,10 @@ spec = describe "Accounts" $ do
207
215
monadicIO $ do
208
216
wId <- pick arbitrary
209
217
withLayer $ \ layer _ -> do
210
- res <- (WalletLayer. _pwlUpdateAccount layer) wId 100 (V1. AccountUpdate " new account" )
218
+ res <- WalletLayer. _pwlUpdateAccount layer
219
+ wId
220
+ (V1. unsafeMkAccountIndex 100 )
221
+ (V1. AccountUpdate " new account" )
211
222
case res of
212
223
Left (WalletLayer. UpdateAccountError
213
224
(V1 (Kernel. UnknownHdAccountRoot _))) ->
@@ -224,7 +235,10 @@ spec = describe "Accounts" $ do
224
235
monadicIO $ do
225
236
withFixture $ \ _ layer _ Fixture {.. } -> do
226
237
let wId = V1. walId fixtureV1Wallet
227
- res <- (WalletLayer. _pwlUpdateAccount layer) wId 100 (V1. AccountUpdate " new account" )
238
+ res <- WalletLayer. _pwlUpdateAccount layer
239
+ wId
240
+ (V1. unsafeMkAccountIndex 100 )
241
+ (V1. AccountUpdate " new account" )
228
242
case res of
229
243
Left (WalletLayer. UpdateAccountError
230
244
(V1 (Kernel. UnknownHdAccount _))) ->
@@ -268,7 +282,9 @@ spec = describe "Accounts" $ do
268
282
monadicIO $ do
269
283
wId <- pick arbitrary
270
284
withLayer $ \ layer _ -> do
271
- res <- (WalletLayer. _pwlGetAccount layer) wId 100
285
+ res <- WalletLayer. _pwlGetAccount layer
286
+ wId
287
+ (V1. unsafeMkAccountIndex 100 )
272
288
case res of
273
289
Left (WalletLayer. GetAccountError (V1 (Kernel. UnknownHdAccountRoot _))) ->
274
290
return ()
@@ -283,7 +299,9 @@ spec = describe "Accounts" $ do
283
299
prop " fails if the account doesn't exists" $ withMaxSuccess 50 $ do
284
300
monadicIO $ do
285
301
withFixture $ \ _ layer _ Fixture {.. } -> do
286
- res <- (WalletLayer. _pwlGetAccount layer) (V1. walId fixtureV1Wallet) 100
302
+ res <- WalletLayer. _pwlGetAccount layer
303
+ (V1. walId fixtureV1Wallet)
304
+ (V1. unsafeMkAccountIndex 100 )
287
305
case res of
288
306
Left (WalletLayer. GetAccountError (V1 (Kernel. UnknownHdAccount _))) ->
289
307
return ()
0 commit comments