File tree Expand file tree Collapse file tree 7 files changed +40
-9
lines changed
Packages/Sequence-Unity/Sequence/SequenceBoilerplates/Scripts Expand file tree Collapse file tree 7 files changed +40
-9
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public class BoilerplateController : MonoBehaviour
3131 [ SerializeField ] private string _marketplaceDescription = "Browse and interact with listings on a Peer-to-Peer, Secondary Sales marketplace." ;
3232 [ SerializeField ] private string _checkoutDescription = "Buy an ERC1155 token via a Primary Sales contract using the Checkout Panel - pay with crypto or fiat." ;
3333
34- private readonly EmbeddedWalletAdapter _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
34+ private EmbeddedWalletAdapter _adapter ;
3535
3636 private SequenceLoginWindow _loginWindow ;
3737 private SequencePlayerProfile _playerProfile ;
@@ -60,6 +60,8 @@ private void Awake()
6060 }
6161 } ;
6262 } ;
63+
64+ _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
6365 }
6466
6567 private void Start ( )
Original file line number Diff line number Diff line change @@ -19,13 +19,18 @@ public class SequenceDailyRewards : MonoBehaviour
1919 [ SerializeField ] private MessagePopup _messagePopup ;
2020 [ SerializeField ] private GenericObjectPool < SequenceDailyRewardTile > _tilePool ;
2121
22- private readonly EmbeddedWalletAdapter _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
22+ private EmbeddedWalletAdapter _adapter ;
2323
2424 private string _apiUrl ;
2525 private Action _onClose ;
2626 private DailyRewardsStatusData _rewardsData ;
2727 private Dictionary < string , TokenSupply [ ] > _supplies ;
2828
29+ private void Awake ( )
30+ {
31+ _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
32+ }
33+
2934 /// <summary>
3035 /// This function is called when the user clicks the close button.
3136 /// </summary>
Original file line number Diff line number Diff line change @@ -26,13 +26,18 @@ public class SequenceInGameShop : MonoBehaviour
2626 [ Header ( "Tile Object Pool" ) ]
2727 [ SerializeField ] private GenericObjectPool < SequenceInGameShopTile > _tilePool ;
2828
29- private readonly EmbeddedWalletAdapter _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
29+ private EmbeddedWalletAdapter _adapter ;
3030
3131 private string _tokenContractAddress ;
3232 private string _saleContractAddress ;
3333 private int [ ] _itemsForSale ;
3434 private Action _onClose ;
3535 private SequenceInGameShopState _saleState ;
36+
37+ private void Awake ( )
38+ {
39+ _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
40+ }
3641
3742 /// <summary>
3843 /// This function is called when the user clicks the close button.
Original file line number Diff line number Diff line change 11using System ;
22using System . Threading . Tasks ;
33using Sequence . Adapter ;
4- using Sequence . EmbeddedWallet ;
54using Sequence . Utils ;
65using TMPro ;
76using UnityEngine ;
@@ -28,12 +27,17 @@ public class SequenceInventory : MonoBehaviour
2827 [ SerializeField ] private GenericObjectPool < Component > _messagePool ;
2928 [ SerializeField ] private GenericObjectPool < SequenceInventoryTile > _tilePool ;
3029
31- private readonly EmbeddedWalletAdapter _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
30+ private EmbeddedWalletAdapter _adapter ;
3231
3332 private string [ ] _collections ;
3433 private Action _onClose ;
3534 private TokenBalance _selectedBalance ;
36-
35+
36+ private void Awake ( )
37+ {
38+ _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
39+ }
40+
3741 /// <summary>
3842 /// This function is called when the user clicks the close button.
3943 /// </summary>
Original file line number Diff line number Diff line change @@ -25,11 +25,16 @@ public class SequenceLoginWindow : MonoBehaviour
2525 [ SerializeField ] private MessagePopup _messagePopup ;
2626 [ SerializeField ] private GameObject [ ] _socialTexts ;
2727
28- private readonly EmbeddedWalletAdapter _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
28+ private EmbeddedWalletAdapter _adapter ;
2929
3030 private Action _onClose ;
3131 private string _curEmail ;
3232
33+ private void Awake ( )
34+ {
35+ _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
36+ }
37+
3338 private void Start ( )
3439 {
3540 _emailInput . onValueChanged . AddListener ( VerifyEmailInput ) ;
Original file line number Diff line number Diff line change @@ -24,11 +24,16 @@ public class SequencePlayerProfile : MonoBehaviour
2424 [ SerializeField ] private GenericObjectPool < TransactionHistoryTile > _transactionPool ;
2525 [ SerializeField ] private GenericObjectPool < LinkedWalletTile > _walletsPool ;
2626
27- private readonly EmbeddedWalletAdapter _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
27+ private EmbeddedWalletAdapter _adapter ;
2828
2929 private Action _onClose ;
3030 private Address _currency ;
3131 private EOAWalletLinker _walletLinker ;
32+
33+ private void Awake ( )
34+ {
35+ _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
36+ }
3237
3338 /// <summary>
3439 /// This function is called when the user clicks the close button.
Original file line number Diff line number Diff line change @@ -16,11 +16,16 @@ public class SequenceSignMessage : MonoBehaviour
1616 [ SerializeField ] private MessagePopup _messagePopup ;
1717 [ SerializeField ] private string _initSignatureText ;
1818
19- private readonly EmbeddedWalletAdapter _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
19+ private EmbeddedWalletAdapter _adapter ;
2020
2121 private Action _onClose ;
2222 private string _curInput ;
2323 private string _curSignature ;
24+
25+ private void Awake ( )
26+ {
27+ _adapter = EmbeddedWalletAdapter . GetInstance ( ) ;
28+ }
2429
2530 private void Start ( )
2631 {
You can’t perform that action at this time.
0 commit comments