From dd3dd7276aeb9f73febe310d7e8dbf6d1c591046 Mon Sep 17 00:00:00 2001 From: Evguenia degtiareva Date: Tue, 23 Jul 2019 16:33:04 -0700 Subject: [PATCH] Hotfix for blank project to work with nightshade api --- blank_project/src/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blank_project/src/main.js b/blank_project/src/main.js index 4af6a771..b5aab4d6 100755 --- a/blank_project/src/main.js +++ b/blank_project/src/main.js @@ -4,7 +4,8 @@ async function initContract() { // Initializing connection to the NEAR DevNet. - window.near = await nearlib.connect(nearConfig); + + window.near = await nearlib.connect(Object.assign({ deps: { keyStore: new nearlib.keyStores.BrowserLocalStorageKeyStore() } }, nearConfig)); // Initializing our contract APIs by contract name and configuration. window.contract = await near.loadContract(nearConfig.contractName, { @@ -15,7 +16,7 @@ async function initContract() { changeMethods: [], // Sender is the account ID to initialize transactions. // For devnet we create accounts on demand. See other examples on how to authorize accounts. - sender: nearlib.dev.myAccountId + sender: nearConfig.contractName }); }