cli: Properly build anchor.Wallet for shell template script (#778)
This commit is contained in:
parent
b0b9efc30d
commit
2a5e16357b
|
@ -282,8 +282,10 @@ pub fn node_shell(
|
||||||
const anchor = require('@project-serum/anchor');
|
const anchor = require('@project-serum/anchor');
|
||||||
const web3 = anchor.web3;
|
const web3 = anchor.web3;
|
||||||
const PublicKey = anchor.web3.PublicKey;
|
const PublicKey = anchor.web3.PublicKey;
|
||||||
|
const Keypair = anchor.web3.Keypair;
|
||||||
|
|
||||||
const __wallet = new anchor.Wallet(
|
const __wallet = new anchor.Wallet(
|
||||||
|
Keypair.fromSecretKey(
|
||||||
Buffer.from(
|
Buffer.from(
|
||||||
JSON.parse(
|
JSON.parse(
|
||||||
require('fs').readFileSync(
|
require('fs').readFileSync(
|
||||||
|
@ -294,6 +296,7 @@ const __wallet = new anchor.Wallet(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
const __connection = new web3.Connection("{}", "processed");
|
const __connection = new web3.Connection("{}", "processed");
|
||||||
const provider = new anchor.Provider(__connection, __wallet, {{
|
const provider = new anchor.Provider(__connection, __wallet, {{
|
||||||
|
|
Loading…
Reference in New Issue