@@ -35,7 +35,7 @@ export interface WalletListCreateRowProps {
3535
3636export const WalletListCreateRowComponent = (
3737 props : WalletListCreateRowProps
38- ) => {
38+ ) : React . ReactElement => {
3939 const {
4040 createItem,
4141 createWalletId,
@@ -88,7 +88,7 @@ export const WalletListCreateRowComponent = (
8888 if ( walletType != null ) {
8989 await dispatch ( createAndSelectWallet ( pluginId , keyOptions ) )
9090 . then ( handleRes )
91- . catch ( err => {
91+ . catch ( ( err : unknown ) => {
9292 showError ( err )
9393 } )
9494 . finally ( ( ) => ( pressMutexRef . current = false ) )
@@ -104,13 +104,15 @@ export const WalletListCreateRowComponent = (
104104 } )
105105 )
106106 . then ( handleRes )
107- . catch ( err => {
107+ . catch ( ( err : unknown ) => {
108108 showError ( err )
109109 } )
110110 . finally ( ( ) => ( pressMutexRef . current = false ) )
111111 } else {
112112 await Airship . show ( bridge => {
113- const renderRow = ( wallet : EdgeCurrencyWallet ) => (
113+ const renderRow = (
114+ wallet : EdgeCurrencyWallet
115+ ) : React . ReactElement => (
114116 < WalletListCurrencyRow
115117 tokenId = { null }
116118 wallet = { wallet }
@@ -149,7 +151,7 @@ export const WalletListCreateRowComponent = (
149151 />
150152 )
151153 } )
152- . catch ( err => {
154+ . catch ( ( err : unknown ) => {
153155 showError ( err )
154156 } )
155157 . finally ( ( ) => ( pressMutexRef . current = false ) )
@@ -238,12 +240,12 @@ function createAndSelectToken({
238240 )
239241
240242 await wallet . changeEnabledTokenIds ( [ ...wallet . enabledTokenIds , tokenId ] )
241- if ( trackingEventSuccess != null ) logEvent ( trackingEventSuccess )
243+ if ( trackingEventSuccess != null ) dispatch ( logEvent ( trackingEventSuccess ) )
242244 return wallet
243245 } catch ( error : any ) {
244246 showError ( error )
245247 if ( trackingEventFailed != null )
246- logEvent ( trackingEventFailed , { error : String ( error ) } )
248+ dispatch ( logEvent ( trackingEventFailed , { error : String ( error ) } ) )
247249 }
248250 }
249251}
0 commit comments