File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Packages/io.chainsafe.web3-unity/Runtime/Scripts Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ namespace ChainSafe.Gaming.UnityPackage
1414 /// </summary>
1515 public class ConnectToWallet : ServiceAdapter , IWeb3InitializedHandler , ILogoutHandler
1616 {
17- [ SerializeField ] private bool rememberMe = true ;
18-
1917 [ Space ] [ SerializeField ] private Button connectButton ;
2018
2119 [ SerializeField ] private Button disconnectButton ;
@@ -32,7 +30,7 @@ private async void Start()
3230 {
3331 try
3432 {
35- await Web3Unity . Instance . Initialize ( rememberMe ) ;
33+ await Web3Unity . Instance . Initialize ( ) ;
3634 }
3735 finally
3836 {
Original file line number Diff line number Diff line change @@ -113,17 +113,22 @@ private async void Awake()
113113 }
114114 }
115115
116+ public Task Initialize ( )
117+ {
118+ return Initialize ( rememberConnection ) ;
119+ }
120+
116121 /// <summary>
117122 /// Initialize Web3Unity.
118123 /// </summary>
119- /// <param name="rememberConnection ">Connect to any saved <see cref="ConnectionProvider"/> if they exist.</param>
120- public async Task Initialize ( bool rememberConnection = true )
124+ /// <param name="rememberMe ">Connect to any saved <see cref="ConnectionProvider"/> if they exist.</param>
125+ public async Task Initialize ( bool rememberMe )
121126 {
122127 _connectionHandler = GetComponent < ConnectionHandler > ( ) ;
123128
124- await _connectionHandler . Initialize ( rememberConnection ) ;
129+ await _connectionHandler . Initialize ( rememberMe ) ;
125130
126- if ( rememberConnection )
131+ if ( rememberMe )
127132 {
128133 try
129134 {
You can’t perform that action at this time.
0 commit comments