Skip to content

Commit

Permalink
Merge branch '45_Add_support_for_market_fee_sharing' of github.com:do…
Browse files Browse the repository at this point in the history
…t5enko/bitsharesjs into 45_Add_support_for_market_fee_sharing
  • Loading branch information
serhii committed May 31, 2019
2 parents b1b90e7 + 7c64c1c commit 7682cb2
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/chain/TransactionBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,4 +546,49 @@ describe("TransactionBuilder", () => {
tr.add_type_operation("asset_create", operationJSON);
});
});

it("Asset create with extension", () => {
let tr = new TransactionBuilder();
let operationJSON = {
fee: {
amount: 0,
asset_id: 0
},
issuer: "1.2.1",
symbol: "TESTTEST",
precision: 5,
common_options: {
max_supply: "10000000000",
market_fee_percent: 0,
max_market_fee: "0",
issuer_permissions: 79,
flags: 0,
core_exchange_rate: {
base: {
amount: 100000,
asset_id: "1.3.0"
},
quote: {
amount: 100000,
asset_id: "1.3.1"
}
},
whitelist_authorities: [],
blacklist_authorities: [],
whitelist_markets: [],
blacklist_markets: [],
description: JSON.stringify({main: "", market: ""}),
extensions: {
reward_percent: 100, // 1 percent
whitelist_market_fee_sharing: ["1.2.680", "1.2.679"]
}
},
is_prediction_market: false,
extensions: null
};

assert.doesNotThrow(function() {
tr.add_type_operation("asset_create", operationJSON);
});
});
});

0 comments on commit 7682cb2

Please sign in to comment.