Skip to content

Commit

Permalink
Merge pull request #75 from nearprotocol/j-blankproj
Browse files Browse the repository at this point in the history
Hotfix for blank project to work with nightshade api
  • Loading branch information
vgrichina authored Jul 24, 2019
2 parents b110e5b + dd3dd72 commit 6e6e574
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 6e6e574

Please sign in to comment.