Skip to content

Commit

Permalink
Hotfix for blank project to work with nightshade api
Browse files Browse the repository at this point in the history
  • Loading branch information
janedegtiareva committed Jul 23, 2019
1 parent b110e5b commit dd3dd72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blank_project/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -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
});
}

Expand Down

0 comments on commit dd3dd72

Please sign in to comment.