Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sell: function (p) {
assert.deepEqual(JSON.stringify(p), JSON.stringify({
amount: abi.fix(120, 'hex'),
price: abi.fix(.35, 'hex'),
market: '0xa1',
outcome: '1',
scalarMinMax: null,
onSent: noop,
onSuccess: noop,
onFailed: noop,
minimumTradeSize: abi.fix(MINIMUM_TRADE_SIZE, 'hex'),
isShortAsk: 0,
tradeGroupID: 0
}));
finished();
}
});
assertions: function (tx) {
assert.deepEqual(JSON.stringify(tx), JSON.stringify({
branch: '1010101',
description: 'This is a test event description',
expDate: parseInt(1500000000, 10),
minValue: abi.fix('1', "hex"),
maxValue: abi.fix('50', "hex"),
numOutcomes: '2',
resolution: 'https://iknoweverything.com'
}));
}
});
buy: function (p) {
assert.deepEqual(JSON.stringify(p), JSON.stringify({
amount: abi.fix(320, 'hex'),
price: abi.fix(0.85, 'hex'),
market: '0xa1',
outcome: '1',
scalarMinMax: null,
onSent: noop,
onSuccess: noop,
onFailed: noop,
tradeGroupID: '0x01',
minimumTradeSize: abi.fix(MINIMUM_TRADE_SIZE, 'hex'),
}));
finished();
},
});
shortAsk: function (p) {
assert.deepEqual(JSON.stringify(p), JSON.stringify({
amount: abi.fix(5, 'hex'),
price: abi.fix(0.95, 'hex'),
market: '0xa1',
outcome: '1',
scalarMinMax: null,
tradeGroupID: '0x01',
onSent: noop,
onSuccess: noop,
onFailed: noop,
minimumTradeSize: abi.fix(MINIMUM_TRADE_SIZE, 'hex'),
}));
finished();
}
});
assertions: function (tx) {
assert.deepEqual(JSON.stringify(tx), JSON.stringify({
branch: '1010101',
description: 'This is a test event description',
expDate: parseInt(1500000000, 10),
minValue: abi.fix('10', "hex"),
maxValue: abi.fix('250', "hex"),
numOutcomes: '2',
resolution: ''
}));
}
});