Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Hotfix for blank project to work with nightshade api #75

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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