Skip to content

Commit

Permalink
using clone
Browse files Browse the repository at this point in the history
  • Loading branch information
hh committed Apr 7, 2022
1 parent b668274 commit 140e69f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/js/erc20.scrypttest.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ describe('Test sCrypt contract Erc20 In Javascript', () => {

const receiverKeyIndex = findKeyIndex(map, receiver);

const erc20 = new ERC20(FIRST_MINT, toHashedMap(map))
erc20._totalSupply = FIRST_MINT
const erc20 = coin.liberc20.clone();
erc20.balances = toHashedMap(map)
let newLockingScript = coin.getNewStateScript({
liberc20: erc20
Expand Down Expand Up @@ -145,8 +144,7 @@ describe('Test sCrypt contract Erc20 In Javascript', () => {
map.set(receiver, senderBalance - amount)
map.set(sender, receiverBalance + amount)

const erc20 = new ERC20(FIRST_MINT, toHashedMap(map))
erc20._totalSupply = FIRST_MINT
const erc20 = coin.liberc20.clone();
erc20.balances = toHashedMap(map)
let newLockingScript = coin.getNewStateScript({
liberc20: erc20
Expand Down Expand Up @@ -196,8 +194,7 @@ describe('Test sCrypt contract Erc20 In Javascript', () => {

const receiverKeyIndex = findKeyIndex(map, sender);

const erc20 = new ERC20(FIRST_MINT, toHashedMap(map))
erc20._totalSupply = FIRST_MINT
const erc20 = coin.liberc20.clone();
erc20.balances = toHashedMap(map)
let newLockingScript = coin.getNewStateScript({
liberc20: erc20
Expand Down

0 comments on commit 140e69f

Please sign in to comment.