Skip to content

Commit 5b131b0

Browse files
committed
progress push
1 parent 4b195dd commit 5b131b0

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

Assets/Thirdweb/Examples/Scenes/Scene_Playground.unity

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,30 @@ PrefabInstance:
175175
serializedVersion: 3
176176
m_TransformParent: {fileID: 0}
177177
m_Modifications:
178+
- target: {fileID: 376894756574179703, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
179+
propertyPath: m_AnchorMax.y
180+
value: 0
181+
objectReference: {fileID: 0}
182+
- target: {fileID: 376894756574179703, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
183+
propertyPath: m_AnchorMin.y
184+
value: 0
185+
objectReference: {fileID: 0}
186+
- target: {fileID: 376894756574179703, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
187+
propertyPath: m_SizeDelta.x
188+
value: 0
189+
objectReference: {fileID: 0}
190+
- target: {fileID: 376894756574179703, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
191+
propertyPath: m_AnchoredPosition.x
192+
value: 0
193+
objectReference: {fileID: 0}
194+
- target: {fileID: 1288923049808236541, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
195+
propertyPath: <BundleId>k__BackingField
196+
value: com.thirdweb.unitysdk
197+
objectReference: {fileID: 0}
198+
- target: {fileID: 1288923049808236541, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
199+
propertyPath: <ClientId>k__BackingField
200+
value: 7e7c070be896e27ffd5352e264df9bcc
201+
objectReference: {fileID: 0}
178202
- target: {fileID: 2985666425045432145, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
179203
propertyPath: m_Name
180204
value: ThirdwebManager
@@ -231,6 +255,58 @@ PrefabInstance:
231255
propertyPath: m_AnchoredPosition.y
232256
value: 0
233257
objectReference: {fileID: 0}
258+
- target: {fileID: 7170212912554528707, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
259+
propertyPath: m_AnchorMax.y
260+
value: 0
261+
objectReference: {fileID: 0}
262+
- target: {fileID: 7170212912554528707, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
263+
propertyPath: m_AnchorMin.y
264+
value: 0
265+
objectReference: {fileID: 0}
266+
- target: {fileID: 7170212912554528707, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
267+
propertyPath: m_AnchoredPosition.x
268+
value: 0
269+
objectReference: {fileID: 0}
270+
- target: {fileID: 7170212912554528707, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
271+
propertyPath: m_AnchoredPosition.y
272+
value: 0
273+
objectReference: {fileID: 0}
274+
- target: {fileID: 7170212912609988251, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
275+
propertyPath: m_AnchorMax.y
276+
value: 0
277+
objectReference: {fileID: 0}
278+
- target: {fileID: 7170212912609988251, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
279+
propertyPath: m_AnchorMin.y
280+
value: 0
281+
objectReference: {fileID: 0}
282+
- target: {fileID: 7170212912609988251, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
283+
propertyPath: m_AnchoredPosition.x
284+
value: 0
285+
objectReference: {fileID: 0}
286+
- target: {fileID: 7170212912609988251, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
287+
propertyPath: m_AnchoredPosition.y
288+
value: 0
289+
objectReference: {fileID: 0}
290+
- target: {fileID: 7170212914370332091, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
291+
propertyPath: m_AnchorMax.y
292+
value: 0
293+
objectReference: {fileID: 0}
294+
- target: {fileID: 7170212914370332091, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
295+
propertyPath: m_AnchorMin.y
296+
value: 0
297+
objectReference: {fileID: 0}
298+
- target: {fileID: 7170212914370332091, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
299+
propertyPath: m_SizeDelta.x
300+
value: 0
301+
objectReference: {fileID: 0}
302+
- target: {fileID: 7170212914370332091, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
303+
propertyPath: m_AnchoredPosition.x
304+
value: 0
305+
objectReference: {fileID: 0}
306+
- target: {fileID: 7170212914370332091, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
307+
propertyPath: m_AnchoredPosition.y
308+
value: 0
309+
objectReference: {fileID: 0}
234310
- target: {fileID: 7977017408921700919, guid: f1f7a02a8c5efe54c95062bd90592227, type: 3}
235311
propertyPath: m_LocalPosition.x
236312
value: 0

Assets/Thirdweb/Examples/Scripts/ThirdwebIntegrationTest.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ private async void Test()
3232

3333
ThirdwebDebug.Log($"Connected to Wallet: {_wallet.GetType().Name}");
3434
ThirdwebDebug.Log($"Address: {await _wallet.GetAddress()}");
35+
36+
var personalWallet = _wallet is SmartWallet ? await (_wallet as SmartWallet).GetPersonalAccount() : _wallet;
37+
if (personalWallet is InAppWallet)
38+
{
39+
var inAppWallet = personalWallet as InAppWallet;
40+
await inAppWallet.Disconnect();
41+
}
3542
}
3643
}
3744
}

Assets/Thirdweb/Runtime/Unity/Wallets/UI/InAppWalletModal.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public static Task<InAppWallet> VerifyOTP(InAppWallet wallet)
2828
modal.OTPInputField.text = string.Empty;
2929
modal.InAppWalletCanvas.gameObject.SetActive(true);
3030

31+
modal.OTPInputField.interactable = true;
32+
modal.SubmitButton.interactable = true;
33+
3134
var tcs = new TaskCompletionSource<InAppWallet>();
3235

3336
modal.SubmitButton.onClick.AddListener(async () =>
@@ -38,6 +41,8 @@ public static Task<InAppWallet> VerifyOTP(InAppWallet wallet)
3841
return;
3942
}
4043

44+
modal.OTPInputField.interactable = false;
45+
modal.SubmitButton.interactable = false;
4146
(var address, var canRetry) = await wallet.SubmitOTP(otp);
4247
if (address != null)
4348
{
@@ -52,6 +57,8 @@ public static Task<InAppWallet> VerifyOTP(InAppWallet wallet)
5257
else
5358
{
5459
modal.OTPInputField.text = string.Empty;
60+
modal.OTPInputField.interactable = true;
61+
modal.SubmitButton.interactable = true;
5562
}
5663
});
5764

0 commit comments

Comments
 (0)