From 5d9a0e4d13daaace6b15efc7817c2c43b3303caf Mon Sep 17 00:00:00 2001 From: Illia Polosukhin Date: Wed, 19 Jun 2019 23:41:37 +0800 Subject: [PATCH] Replace outdated key with new key in blank project (only works for tests). Fix typo in test_environment --- blank_project/neardev/devkey.json | 1 - blank_project/neardev/test/test.near | 5 +++++ test_environment.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 blank_project/neardev/devkey.json create mode 100644 blank_project/neardev/test/test.near diff --git a/blank_project/neardev/devkey.json b/blank_project/neardev/devkey.json deleted file mode 100644 index 77468e47..00000000 --- a/blank_project/neardev/devkey.json +++ /dev/null @@ -1 +0,0 @@ -{"public_key":"HQT9s2XAuRNkCMyykWudxAnbS6UMYhYHZ9o5RQb513xC","secret_key":"ds1tUZviLRhaaEuiqhRNFFapSRHg8S98nphxNKAgVhUepqH4v9mjHvpNnpQ4GNhi29k5fpwDbyjZnJaCSwbEznk","account_id":"contract2"} \ No newline at end of file diff --git a/blank_project/neardev/test/test.near b/blank_project/neardev/test/test.near new file mode 100644 index 00000000..2df4e9ab --- /dev/null +++ b/blank_project/neardev/test/test.near @@ -0,0 +1,5 @@ +{ + "account_id": "test.near", + "public_key": "22skMptHjFWNyuEWY22ftn2AbLPSYpmYwGJRGwpNHbTV", + "secret_key": "2wyRcSwSuHtRVmkMCGjPwnzZmQLeXLzLLyED1NDMt4BjnKgQL6tF85yBx6Jr26D2dUNeC716RBoTxntVHsegogYw" +} \ No newline at end of file diff --git a/test_environment.js b/test_environment.js index 6f7919ae..1cdce490 100644 --- a/test_environment.js +++ b/test_environment.js @@ -18,7 +18,7 @@ class LocalTestEnvironment extends NodeEnvironment { contractName: "test" + Date.now(), accountId: "test" + Date.now() }); - const keyStore = new nearlib.keyStore.UnencryptedFileSystemKeyStore('./nearlib'); + const keyStore = new nearlib.keyStores.UnencryptedFileSystemKeyStore('./neardev'); await keyStore.setKey(config.networkId, testAccountName, nearlib.utils.KeyPair.fromString('ed25519:2wyRcSwSuHtRVmkMCGjPwnzZmQLeXLzLLyED1NDMt4BjnKgQL6tF85yBx6Jr26D2dUNeC716RBoTxntVHsegogYw')); config.deps = Object.assign(config.deps || {}, { storage: this.createFakeStorage(),