@@ -15,10 +15,6 @@ import {
15
15
import { UnlockLightningWalletBody , UnlockLightningWalletParams } from '../../../src/typedRoutes/api/v2/unlockWallet' ;
16
16
import { OfcSignPayloadBody } from '../../../src/typedRoutes/api/v2/ofcSignPayload' ;
17
17
import { CreateAddressBody , CreateAddressParams } from '../../../src/typedRoutes/api/v2/createAddress' ;
18
- import {
19
- KeychainChangePasswordBody ,
20
- KeychainChangePasswordParams ,
21
- } from '../../../src/typedRoutes/api/v2/keychainChangePassword' ;
22
18
23
19
export function assertDecode < T > ( codec : t . Type < T , unknown > , input : unknown ) : T {
24
20
const result = codec . decode ( input ) ;
@@ -247,24 +243,4 @@ describe('io-ts decode tests', function () {
247
243
assertDecode ( t . type ( CreateAddressBody ) , { eip1559 : { maxFeePerGas : 1 , maxPriorityFeePerGas : 1 } } ) ;
248
244
assertDecode ( t . type ( CreateAddressBody ) , { } ) ;
249
245
} ) ;
250
-
251
- it ( 'express.keychain.changePassword' , function ( ) {
252
- // missing id
253
- assert . throws ( ( ) => assertDecode ( t . type ( KeychainChangePasswordParams ) , { coin : 'btc' } ) ) ;
254
- // invalid coin type
255
- assert . throws ( ( ) => assertDecode ( t . type ( KeychainChangePasswordParams ) , { coin : 123 , id : 'abc' } ) ) ;
256
- // valid params
257
- assertDecode ( t . type ( KeychainChangePasswordParams ) , { coin : 'btc' , id : 'abc' } ) ;
258
- // missing required fields
259
- assert . throws ( ( ) => assertDecode ( t . type ( KeychainChangePasswordBody ) , { } ) ) ;
260
- assert . throws ( ( ) => assertDecode ( t . type ( KeychainChangePasswordBody ) , { oldPassword : 'a' } ) ) ;
261
- assert . throws ( ( ) => assertDecode ( t . type ( KeychainChangePasswordBody ) , { newPassword : 'b' } ) ) ;
262
- // invalid types
263
- assert . throws ( ( ) => assertDecode ( t . type ( KeychainChangePasswordBody ) , { oldPassword : 1 , newPassword : 'b' } ) ) ;
264
- assert . throws ( ( ) => assertDecode ( t . type ( KeychainChangePasswordBody ) , { oldPassword : 'a' , newPassword : 2 } ) ) ;
265
- // valid minimal
266
- assertDecode ( t . type ( KeychainChangePasswordBody ) , { oldPassword : 'a' , newPassword : 'b' } ) ;
267
- // valid with optional otp
268
- assertDecode ( t . type ( KeychainChangePasswordBody ) , { oldPassword : 'a' , newPassword : 'b' , otp : '123456' } ) ;
269
- } ) ;
270
246
} ) ;
0 commit comments