@@ -93,6 +93,9 @@ import {
93
93
setNewNanoContractStatusSuccess ,
94
94
} from '../actions' ;
95
95
import { checkForFeatureFlag , getNetworkSettings , showPinScreenForResult } from './helpers' ;
96
+ import { logger } from '../logger' ;
97
+
98
+ const log = logger ( 'walletConnect' ) ;
96
99
97
100
const AVAILABLE_METHODS = {
98
101
HATHOR_SIGN_MESSAGE : 'htr_signWithAddress' ,
@@ -429,17 +432,25 @@ const promptHandler = (dispatch) => (request, requestMetadata) =>
429
432
* This saga will be called (dispatched from the event listener) when a sign
430
433
* message RPC is published from a dApp
431
434
*
432
- * @param {String } data.requestId Unique identifier of the request
433
- * @param {String } data.topic Unique identifier of the connected session
434
- * @param {String } data.message Message the dApp requested a signature for
435
+ * @param {String } payload.data.requestId Unique identifier of the request
436
+ * @param {String } payload.data.topic Unique identifier of the connected session
437
+ * @param {String } payload.data.message Message the dApp requested a signature for
438
+ * @param {String } payload.dapp.icon The icon sent by the dApp
439
+ * @param {String } payload.dapp.proposer The proposer name sent by the dapp
440
+ * @param {String } payload.dapp.url The url sent by the dApp
441
+ * @param {String } payload.dapp.description The description sent by the dApp
442
+ * @param {String } payload.accept A callback function to indicate that the
443
+ * request has been accepted.
444
+ * @param {String } payload.deny A callback function to indicate that the request
445
+ * has been denied.
435
446
*/
436
447
export function * onSignMessageRequest ( { payload } ) {
437
448
const { accept, deny : denyCb , data, dapp } = payload ;
438
449
439
450
const wallet = yield select ( ( state ) => state . wallet ) ;
440
451
441
452
if ( ! wallet . isReady ( ) ) {
442
- console . error ( 'Got a session request but wallet is not ready, ignoring..' ) ;
453
+ log . error ( 'Got a session request but wallet is not ready, ignoring..' ) ;
443
454
return ;
444
455
}
445
456
@@ -466,6 +477,22 @@ export function* onSignMessageRequest({ payload }) {
466
477
accept ( ) ;
467
478
}
468
479
480
+ /**
481
+ * This saga will be called (dispatched from the event listener) when a
482
+ * sendNanoContractTx message RPC is published from a dApp
483
+ *
484
+ * @param {String } payload.data.requestId Unique identifier of the request
485
+ * @param {String } payload.data.topic Unique identifier of the connected session
486
+ * @param {String } payload.data.message Message the dApp requested a signature for
487
+ * @param {String } payload.dapp.icon The icon sent by the dApp
488
+ * @param {String } payload.dapp.proposer The proposer name sent by the dapp
489
+ * @param {String } payload.dapp.url The url sent by the dApp
490
+ * @param {String } payload.dapp.description The description sent by the dApp
491
+ * @param {String } payload.accept A callback function to indicate that the
492
+ * request has been accepted.
493
+ * @param {String } payload.deny A callback function to indicate that the request
494
+ * has been denied.
495
+ */
469
496
export function * onSendNanoContractTxRequest ( { payload } ) {
470
497
const { accept : acceptCb , deny : denyCb , nc, dapp } = payload ;
471
498
0 commit comments