Skip to content

Commit

Permalink
fix: synthetixJs reference and PK passing
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <jakub.mucha@icloud.com>
  • Loading branch information
drptbl committed Dec 12, 2020
1 parent f5d3026 commit cd1df78
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions commands/synthetix.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
const { synthetixJs } = require('synthetix-js');
const { SynthetixJs } = require('synthetix-js');
const { getNetwork } = require('../helpers');

module.exports = {
settle: async ({ asset, privateKey }) => {
if (privateKey === undefined && process.env.PRIVATE_KEY) {
privateKey = process.env.PRIVATE_KEY;
}
const network = getNetwork();
const signer = new synthetixJs.signers.PrivateKey(
const signer = new SynthetixJs.signers.PrivateKey(
// eslint-disable-next-line unicorn/no-null
null,
network,
`0x${privateKey}`,
);
const snxjs = new synthetixJs({ signer, network });
const snxjs = new SynthetixJs({ signer, network });
const { toUtf8Bytes32 } = snxjs.utils;

try {
Expand Down

0 comments on commit cd1df78

Please sign in to comment.