Skip to content

Commit df95bd5

Browse files
committed
updated demo
1 parent a6fe3ce commit df95bd5

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

Packages/Sequence-Unity/Sequence/Samples~/Demo/Resources/Prefabs/EcosystemWallet/Transactions/EcosystemWalletTransactions.prefab

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,6 +2390,7 @@ MonoBehaviour:
23902390
m_Script: {fileID: 11500000, guid: 5fa388a969190426facba008de2b8c43, type: 3}
23912391
m_Name:
23922392
m_EditorClassIdentifier:
2393+
_transactionsWindow: {fileID: 2069837365693184587}
23932394
_chain: 42161
23942395
_allowTransactionThroughEcosystem: 0
23952396
_useFeeOptions: 1
@@ -3438,6 +3439,7 @@ MonoBehaviour:
34383439
m_Script: {fileID: 11500000, guid: 5fa388a969190426facba008de2b8c43, type: 3}
34393440
m_Name:
34403441
m_EditorClassIdentifier:
3442+
_transactionsWindow: {fileID: 2069837365693184587}
34413443
_chain: 421614
34423444
_allowTransactionThroughEcosystem: 0
34433445
_useFeeOptions: 0
@@ -4624,6 +4626,7 @@ MonoBehaviour:
46244626
m_Script: {fileID: 11500000, guid: 5fa388a969190426facba008de2b8c43, type: 3}
46254627
m_Name:
46264628
m_EditorClassIdentifier:
4629+
_transactionsWindow: {fileID: 2069837365693184587}
46274630
_chain: 421614
46284631
_allowTransactionThroughEcosystem: 0
46294632
_useFeeOptions: 0

Packages/Sequence-Unity/Sequence/SequenceBoilerplates/Scripts/BoilerplateFactory.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ public static EcosystemWalletTransactions OpenEcosystemWalletTransactions(Transf
6666
b => b.Show(wallet, onClose));
6767
}
6868

69+
public static FeeOptionWindow OpenFeeOptionSelection(Transform parent, Sequence.Relayer.FeeOption[] feeOptions, Action<Sequence.Relayer.FeeOption> onSelected)
70+
{
71+
return GetOrSpawnBoilerplate<FeeOptionWindow>("EcosystemWallet/Transactions/FeeOptionsWindow", parent,
72+
b => b.WaitForSelection(feeOptions, onSelected));
73+
}
74+
6975
/// <summary>
7076
/// Open the Login UI Boilerplate from a Prefab inside the Resources folder.
7177
/// </summary>

Packages/Sequence-Unity/Sequence/SequenceBoilerplates/Scripts/EcosystemWallet/EcosystemFeatureSelection.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,5 @@ public void OpenTransactions()
4747
_featureSelection.SetActive(false);
4848
_transactions.Show(_wallet, OpenFeatureSelection);
4949
}
50-
51-
public void OpenFeeOptionWindow(FeeOption[] feeOptions, Action<FeeOption> onSelected)
52-
{
53-
_feeOptionWindow.WaitForSelection(feeOptions, onSelected);
54-
}
5550
}
5651
}

Packages/Sequence-Unity/Sequence/SequenceBoilerplates/Scripts/EcosystemWallet/TransactionButton.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ private enum State
3333
}
3434

3535
[Header("Transactions")]
36+
[SerializeField] private EcosystemWalletTransactions _transactionsWindow;
3637
[SerializeField] private Chain _chain = Chain.TestnetArbitrumSepolia;
3738
[SerializeField] private bool _allowTransactionThroughEcosystem;
3839
[SerializeField] private bool _useFeeOptions;
@@ -95,7 +96,7 @@ public async void SendTransaction()
9596
try
9697
{
9798
var feeOptions = await _wallet.GetFeeOption(_chain, transaction);
98-
EcosystemFeatureSelection.Instance.OpenFeeOptionWindow(feeOptions, async feeOption =>
99+
BoilerplateFactory.OpenFeeOptionSelection(_transactionsWindow.transform.parent, feeOptions, async feeOption =>
99100
{
100101
if (feeOption != null)
101102
await TrySendTransaction(transaction, feeOption);

0 commit comments

Comments
 (0)