File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { type PartialTezosOperation , TezosOperationType } from "@airgap/beacon-wallet" ;
2
2
import { isValidImplicitPkh , parseImplicitPkh , parsePkh } from "@umami/tezos" ;
3
- import { CustomError } from "@umami/utils" ;
3
+ import { WalletConnectError , WcErrorCode } from "@umami/utils" ;
4
4
5
5
import { type ImplicitAccount } from "./Account" ;
6
6
import { type ImplicitOperations } from "./AccountOperations" ;
@@ -19,7 +19,7 @@ export const toAccountOperations = (
19
19
signer : ImplicitAccount
20
20
) : ImplicitOperations => {
21
21
if ( operationDetails . length === 0 ) {
22
- throw new CustomError ( "Empty operation details!" ) ;
22
+ throw new WalletConnectError ( "Empty operation details!" , WcErrorCode . INVALID_PARAMS , null ) ;
23
23
}
24
24
25
25
const operations = operationDetails . map ( operation =>
@@ -106,6 +106,10 @@ export const partialOperationToOperation = (
106
106
} ;
107
107
}
108
108
default :
109
- throw new CustomError ( `Unsupported operation kind: ${ partialOperation . kind } ` ) ;
109
+ throw new WalletConnectError (
110
+ `Unsupported operation kind: ${ partialOperation . kind } ` ,
111
+ WcErrorCode . METHOD_UNSUPPORTED ,
112
+ null
113
+ ) ;
110
114
}
111
115
} ;
You can’t perform that action at this time.
0 commit comments