@@ -11,6 +11,8 @@ import type {
11
11
ICustodianApi ,
12
12
} from '../../types' ;
13
13
import type { IBitgoEthereumAccountCustodianDetails } from './interfaces/IBitgoEthereumAccountCustodianDetails' ;
14
+ import type { IBitgoTransaction } from './interfaces/IBitgoTransaction' ;
15
+ import logger from '../../../logger' ;
14
16
import { mapTransactionStatus } from '../../../util/map-status' ;
15
17
import type {
16
18
SignedMessageDetails ,
@@ -96,10 +98,17 @@ export class BitgoCustodianApi extends EventEmitter implements ICustodianApi {
96
98
Number ( txParams . gasLimit ) + BITGO_ADDITIONAL_GAS
97
99
) . toString ( ) ;
98
100
99
- const result = await this . #client. createTransaction (
100
- { walletId, coinId } ,
101
- txParams ,
102
- ) ;
101
+ let result : IBitgoTransaction ;
102
+ try {
103
+ result = await this . #client. createTransaction (
104
+ { walletId, coinId } ,
105
+ txParams ,
106
+ ) ;
107
+ } catch ( error ) {
108
+ logger . error ( `Error creating BitGo transaction.` ) ;
109
+ logger . error ( error ) ;
110
+ throw error ;
111
+ }
103
112
104
113
return {
105
114
transactionStatus : mapTransactionStatus ( result . transactionStatus ) ,
@@ -157,13 +166,23 @@ export class BitgoCustodianApi extends EventEmitter implements ICustodianApi {
157
166
async getTransactionLink (
158
167
_transactionId : string ,
159
168
) : Promise < Partial < CustodianDeepLink > | null > {
160
- return null ;
169
+ return {
170
+ text : 'Complete your transaction in the BitGo App' ,
171
+ id : '' ,
172
+ url : '' ,
173
+ action : 'view' ,
174
+ } ;
161
175
}
162
176
163
177
async getSignedMessageLink (
164
178
_signedMessageId : string ,
165
179
) : Promise < Partial < CustodianDeepLink > | null > {
166
- return null ;
180
+ return {
181
+ text : 'Complete your transaction in the BitGo App' ,
182
+ id : '' ,
183
+ url : '' ,
184
+ action : 'view' ,
185
+ } ;
167
186
}
168
187
169
188
changeRefreshTokenAuthDetails ( _authDetails : any ) : void {
0 commit comments