Skip to content

Commit ffb498a

Browse files
committed
build fix (4) wasmclient
1 parent 090d73a commit ffb498a

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

wasmclient/wasmclient.cpp

+20-4
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,25 @@ class AppAPICallback
365365
WasmAppApi::WeakPtr m_Api;
366366
};
367367

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+
368381
class WasmWalletClient
369-
: public IWalletApiHandler
382+
: public OwnRules
383+
, public IWalletApiHandler
370384
, private WalletClient2::ICallbackHandler
371385
{
386+
372387
public:
373388
WasmWalletClient(const std::string& node)
374389
: WasmWalletClient(node, Rules::Network::mainnet)
@@ -394,9 +409,10 @@ class WasmWalletClient
394409
, m_Pass(pass)
395410
, m_Node(node)
396411
{
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+
400416
wallet::g_AssetsEnabled = true;
401417
}
402418

0 commit comments

Comments
 (0)