1
1
import type SafeAppsSDK from '@gnosis.pm/safe-apps-sdk'
2
2
import type { SafeInfo } from '@gnosis.pm/safe-apps-sdk'
3
- import { CommonWalletOptions , Helpers , WalletModule } from '../../../interfaces'
3
+ import { GnosisOptions , Helpers , WalletModule } from '../../../interfaces'
4
4
import gnosisWalletIcon from '../wallet-icons/icon-gnosis'
5
5
6
6
const getSafe = ( sdk : SafeAppsSDK ) : Promise < SafeInfo | undefined > =>
@@ -20,11 +20,16 @@ export const checkGnosisSafeContext = async (selectWallet: () => void) =>
20
20
! ! ( await getSafe ( new ( await import ( '@gnosis.pm/safe-apps-sdk' ) ) . default ( ) ) ) &&
21
21
selectWallet ( )
22
22
23
- function gnosis ( options : CommonWalletOptions ) : WalletModule {
23
+ function gnosis ( options : GnosisOptions ) : WalletModule {
24
24
const { preferred, label, iconSrc, svg, networkId } = options
25
25
26
26
const network = networkId === 4 ? 'rinkeby.' : ''
27
27
const link = `https://${ network } gnosis-safe.io/app`
28
+ const safeAppMessage = options . appName
29
+ ? `Then go to APPS and select <b>${ options . appName } </b>.`
30
+ : options . appUrl
31
+ ? `Then go to APPS and add a custom app with the URL:<br /><b>${ options . appUrl } </b>`
32
+ : ''
28
33
29
34
return {
30
35
name : label || 'Gnosis Safe' ,
@@ -51,7 +56,8 @@ function gnosis(options: CommonWalletOptions): WalletModule {
51
56
link,
52
57
installMessage : ( ) => `
53
58
<p style="font-size: 0.889rem; font-family: inherit; margin: 0.889rem 0;">
54
- Click the button below to open the Gnosis Safe interface.
59
+ Click the button below to open the Gnosis Safe interface.<br />
60
+ ${ safeAppMessage }
55
61
</p>
56
62
` ,
57
63
desktop : true ,
0 commit comments