File tree 1 file changed +20
-4
lines changed
1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -365,10 +365,25 @@ class AppAPICallback
365
365
WasmAppApi::WeakPtr m_Api;
366
366
};
367
367
368
+ thread_local const beam::Rules* beam::Rules::s_pInstance = nullptr ;
369
+
370
+ struct OwnRules
371
+ {
372
+ Rules m_Rules;
373
+ Rules::Scope m_scopeRules;
374
+
375
+ OwnRules ()
376
+ :m_scopeRules(m_Rules)
377
+ {
378
+ }
379
+ };
380
+
368
381
class WasmWalletClient
369
- : public IWalletApiHandler
382
+ : public OwnRules
383
+ , public IWalletApiHandler
370
384
, private WalletClient2::ICallbackHandler
371
385
{
386
+
372
387
public:
373
388
WasmWalletClient (const std::string& node)
374
389
: WasmWalletClient(node, Rules::Network::mainnet)
@@ -394,9 +409,10 @@ class WasmWalletClient
394
409
, m_Pass(pass)
395
410
, m_Node(node)
396
411
{
397
- auto & r = Rules::get ();
398
- r.m_Network = network;
399
- r.SetNetworkParams ();
412
+ m_Rules.m_Network = network;
413
+ m_Rules.SetNetworkParams ();
414
+ m_Rules.UpdateChecksum ();
415
+
400
416
wallet::g_AssetsEnabled = true ;
401
417
}
402
418
You can’t perform that action at this time.
0 commit comments