@@ -43,7 +43,7 @@ void FSmartWalletHandle::Create(const FInAppWalletHandle& InInAppWallet,
43
43
const FStringDelegate& ErrorDelegate)
44
44
{
45
45
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
46
-
46
+
47
47
if (!InInAppWallet.IsValid ())
48
48
{
49
49
if (ErrorDelegate.IsBound ())
@@ -52,7 +52,7 @@ void FSmartWalletHandle::Create(const FInAppWalletHandle& InInAppWallet,
52
52
}
53
53
return ;
54
54
}
55
-
55
+
56
56
UE::Tasks::Launch (UE_SOURCE_LOCATION, [InInAppWallet, ChainID, bGasless, Factory, AccountOverride, SuccessDelegate, ErrorDelegate]
57
57
{
58
58
if (FString Error; Thirdweb::create_smart_wallet (
@@ -84,7 +84,7 @@ void FSmartWalletHandle::IsDeployed(const FBoolDelegate& SuccessDelegate, const
84
84
{
85
85
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
86
86
CHECK_VALIDITY (ErrorDelegate);
87
-
87
+
88
88
FSmartWalletHandle ThisCopy = *this ;
89
89
UE::Tasks::Launch (UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate]
90
90
{
@@ -99,16 +99,18 @@ void FSmartWalletHandle::IsDeployed(const FBoolDelegate& SuccessDelegate, const
99
99
});
100
100
}
101
101
102
- void FSmartWalletHandle::CreateSessionKey (const FString& Signer,
103
- const TArray<FString>& ApprovedTargets,
104
- const FString& NativeTokenLimitPerTransactionInWei,
105
- const FDateTime& PermissionEnd,
106
- const FStringDelegate& SuccessDelegate,
107
- const FStringDelegate& ErrorDelegate)
102
+ void FSmartWalletHandle::CreateSessionKey (
103
+ const FString& Signer,
104
+ const TArray<FString>& ApprovedTargets,
105
+ const FString& NativeTokenLimitPerTransactionInWei,
106
+ const FDateTime& PermissionEnd,
107
+ const FStringDelegate& SuccessDelegate,
108
+ const FStringDelegate& ErrorDelegate
109
+ )
108
110
{
109
111
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
110
112
CHECK_VALIDITY (ErrorDelegate);
111
-
113
+
112
114
FDateTime TenYearsFromNow = FDateTime::UtcNow () + FTimespan::FromDays (10 * 365 );
113
115
FDateTime EndTime = TenYearsFromNow;
114
116
TArray<const char *> ApprovedTargetsCArray;
@@ -167,7 +169,7 @@ void FSmartWalletHandle::RevokeSessionKey(const FString& Signer, const FSimpleDe
167
169
{
168
170
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
169
171
CHECK_VALIDITY (ErrorDelegate);
170
-
172
+
171
173
FSmartWalletHandle ThisCopy = *this ;
172
174
UE::Tasks::Launch (UE_SOURCE_LOCATION, [ThisCopy, Signer, SuccessDelegate, ErrorDelegate]
173
175
{
@@ -186,7 +188,7 @@ void FSmartWalletHandle::GetAdmins(const FStringArrayDelegate& SuccessDelegate,
186
188
{
187
189
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
188
190
CHECK_VALIDITY (ErrorDelegate);
189
-
191
+
190
192
FSmartWalletHandle ThisCopy = *this ;
191
193
UE::Tasks::Launch (UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate]
192
194
{
@@ -219,14 +221,15 @@ void FSmartWalletHandle::AddAdmin(const FString& Signer, const FSimpleDelegate&
219
221
{
220
222
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
221
223
CHECK_VALIDITY (ErrorDelegate);
222
-
224
+
223
225
FSmartWalletHandle ThisCopy = *this ;
224
226
UE::Tasks::Launch (UE_SOURCE_LOCATION, [ThisCopy, Signer, SuccessDelegate, ErrorDelegate]
225
227
{
226
228
if (FString Error; Thirdweb::smart_wallet_add_admin (ThisCopy.GetID (), TO_RUST_STRING (Signer)).AssignResult (Error))
227
229
{
228
230
SuccessDelegate.Execute ();
229
- } else
231
+ }
232
+ else
230
233
{
231
234
ErrorDelegate.Execute (Error);
232
235
}
@@ -237,14 +240,15 @@ void FSmartWalletHandle::RemoveAdmin(const FString& Signer, const FSimpleDelegat
237
240
{
238
241
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
239
242
CHECK_VALIDITY (ErrorDelegate);
240
-
243
+
241
244
FSmartWalletHandle ThisCopy = *this ;
242
245
UE::Tasks::Launch (UE_SOURCE_LOCATION, [ThisCopy, Signer, SuccessDelegate, ErrorDelegate]
243
246
{
244
247
if (FString Error; Thirdweb::smart_wallet_remove_admin (ThisCopy.GetID (), TO_RUST_STRING (Signer)).AssignResult (Error))
245
248
{
246
249
SuccessDelegate.Execute ();
247
- } else
250
+ }
251
+ else
248
252
{
249
253
ErrorDelegate.Execute (Error);
250
254
}
@@ -255,7 +259,7 @@ void FSmartWalletHandle::GetActiveSigners(const FGetActiveSignersDelegate& Succe
255
259
{
256
260
CHECK_DELEGATES (SuccessDelegate, ErrorDelegate);
257
261
CHECK_VALIDITY (ErrorDelegate);
258
-
262
+
259
263
FSmartWalletHandle ThisCopy = *this ;
260
264
UE::Tasks::Launch (UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate]
261
265
{
0 commit comments