@@ -54,6 +54,11 @@ const environments: Environment[] = [
54
54
name : 'local' ,
55
55
walletUrl : 'http://localhost:3333' ,
56
56
projectAccessKey : 'AQAAAAAAAAVCXiQ9f_57R44MjorZ4SmGdhA'
57
+ } ,
58
+ {
59
+ name : 'custom' ,
60
+ walletUrl : '' ,
61
+ projectAccessKey : ''
57
62
}
58
63
]
59
64
@@ -79,6 +84,8 @@ const walletAppURL = urlParams.get('walletAppURL') ?? envConfig.walletUrl
79
84
const projectAccessKey = urlParams . get ( 'projectAccessKey' ) ?? envConfig . projectAccessKey
80
85
const showProhibitedActions = urlParams . has ( 'showProhibitedActions' )
81
86
87
+ const isCustom = walletAppURL !== envConfig . walletUrl || projectAccessKey !== envConfig . projectAccessKey
88
+
82
89
if ( walletAppURL && walletAppURL . length > 0 ) {
83
90
// Wallet can point to a custom wallet app url
84
91
// NOTICE: this is not needed, unless testing an alpha version of the wallet
@@ -993,37 +1000,39 @@ And that has made all the difference.
993
1000
994
1001
< Divider background = "buttonGlass" />
995
1002
996
- < Box marginBottom = "4" >
997
- < Select
998
- name = "environment"
999
- label = { 'Environment' }
1000
- labelLocation = "top"
1001
- onValueChange = { value => {
1002
- // Disconnect the wallet
1003
- disconnect ( )
1004
-
1005
- // Set the new env url param
1006
- urlParams . set ( 'env' , value )
1007
-
1008
- // Clear any existing walletAppURL overrides
1009
- urlParams . delete ( 'walletAppURL' )
1010
-
1011
- // Update the url with the new params and refresh the page
1012
- window . location . search = urlParams . toString ( )
1013
- } }
1014
- value = { env }
1015
- options = { [
1016
- ...Object . values ( environments ) . map ( env => ( {
1017
- label : (
1018
- < Box alignItems = "center" gap = "2" >
1019
- < Text capitalize > { env . name } </ Text >
1020
- </ Box >
1021
- ) ,
1022
- value : String ( env . name )
1023
- } ) )
1024
- ] }
1025
- />
1026
- </ Box >
1003
+ { ! isCustom && (
1004
+ < Box marginBottom = "4" >
1005
+ < Select
1006
+ name = "environment"
1007
+ label = { 'Environment' }
1008
+ labelLocation = "top"
1009
+ onValueChange = { value => {
1010
+ // Disconnect the wallet
1011
+ disconnect ( )
1012
+
1013
+ // Set the new env url param
1014
+ urlParams . set ( 'env' , value )
1015
+
1016
+ // Clear any existing walletAppURL overrides
1017
+ urlParams . delete ( 'walletAppURL' )
1018
+
1019
+ // Update the url with the new params and refresh the page
1020
+ window . location . search = urlParams . toString ( )
1021
+ } }
1022
+ value = { env }
1023
+ options = { [
1024
+ ...Object . values ( environments ) . map ( env => ( {
1025
+ label : (
1026
+ < Box alignItems = "center" gap = "2" >
1027
+ < Text capitalize > { env . name } </ Text >
1028
+ </ Box >
1029
+ ) ,
1030
+ value : String ( env . name )
1031
+ } ) )
1032
+ ] }
1033
+ />
1034
+ </ Box >
1035
+ ) }
1027
1036
1028
1037
< Box marginBottom = "4" >
1029
1038
< Text as = "div" variant = "small" color = "text100" >
@@ -1050,6 +1059,30 @@ And that has made all the difference.
1050
1059
1051
1060
< Divider background = "buttonGlass" />
1052
1061
1062
+ < Box marginBottom = "4" >
1063
+ < Text as = "div" variant = "small" color = "text100" >
1064
+ Project Access Key
1065
+ </ Text >
1066
+
1067
+ < Box
1068
+ as = "a"
1069
+ href = { walletAppURL }
1070
+ target = "_blank"
1071
+ rel = "noopener"
1072
+ textDecoration = "none"
1073
+ gap = "1"
1074
+ marginTop = "1"
1075
+ alignItems = "center"
1076
+ color = "text80"
1077
+ >
1078
+ < Text as = "div" variant = "normal" color = "text80" >
1079
+ { projectAccessKey }
1080
+ </ Text >
1081
+ </ Box >
1082
+ </ Box >
1083
+
1084
+ < Divider background = "buttonGlass" />
1085
+
1053
1086
< Box marginBottom = "4" >
1054
1087
< Select
1055
1088
name = "chainId"
0 commit comments