Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

augur-ui-react-components

Package Overview
Dependencies
Maintainers
2
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

augur-ui-react-components - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

2

package.json
{
"name": "augur-ui-react-components",
"version": "3.0.5",
"version": "3.0.6",
"description": "Augur UI React Components",

@@ -5,0 +5,0 @@ "author": "Baz (@thinkloop)",

@@ -20,9 +20,9 @@ import React, { PropTypes } from 'react';

type="text"
value={p.tradingFeePercent}
value={p.takerFee}
isClearable={false}
onChange={(value) => p.onValuesUpdated({ tradingFeePercent: value })}
onChange={(value) => p.onValuesUpdated({ takerFee: value })}
/>
<span className="denomination">%</span>
{p.errors.tradingFeePercent &&
<span className="error-message">{p.errors.tradingFeePercent}</span>
{p.errors.takerFee &&
<span className="error-message">{p.errors.takerFee}</span>
}

@@ -173,4 +173,4 @@ </div>

isValid: PropTypes.bool,
tradingFeePercent: PropTypes.any,
makerFee: PropTypes.any,
takerFee: PropTypes.number,
makerFee: PropTypes.number,
initialLiquidity: PropTypes.any,

@@ -177,0 +177,0 @@ showAdvancedMarketParams: PropTypes.bool,

export const DESCRIPTION_MIN_LENGTH = 1;
export const DESCRIPTION_MAX_LENGTH = 256;
export const CATEGORICAL_OUTCOMES_MIN_NUM = 2;
export const CATEGORICAL_OUTCOMES_MAX_NUM = 8;
export const CATEGORICAL_OUTCOME_MAX_LENGTH = 250;
export const TAGS_MAX_NUM = 3;
export const TAGS_MAX_LENGTH = 25;
export const RESOURCES_MAX_NUM = 5;
export const RESOURCES_MAX_LENGTH = 1250;
export const EXPIRY_SOURCE_GENERIC = 'generic';
export const EXPIRY_SOURCE_SPECIFIC = 'specific';
export const INITIAL_LIQUIDITY_DEFAULT = 500;
export const INITIAL_LIQUIDITY_MIN = 50;
export const INITIAL_LIQUIDITY_DEFAULT = 500;
export const TRADING_FEE_DEFAULT = 2;
export const TRADING_FEE_MIN = 1;
export const TRADING_FEE_MAX = 12.5;
export const MAKER_FEE_DEFAULT = 0.5;
export const TAKER_FEE_DEFAULT = 2;
export const TAKER_FEE_MIN = 1;
export const TAKER_FEE_MAX = 12.5;
export const MAKER_FEE_DEFAULT = 1;
export const MAKER_FEE_MIN = 0;
export const MAKER_FEE_MAX = 100;
// Advanced Market Creation Defaults
export const STARTING_QUANTITY_DEFAULT = 25;
export const STARTING_QUANTITY_DEFAULT = 10;
export const STARTING_QUANTITY_MIN = 0.1;
export const BEST_STARTING_QUANTITY_DEFAULT = 35;
export const BEST_STARTING_QUANTITY_DEFAULT = 20;
export const BEST_STARTING_QUANTITY_MIN = 0.1;
export const PRICE_WIDTH_DEFAULT = 0.1;
export const PRICE_WIDTH_MIN = 0.01;
export const PRICE_DEPTH_DEFAULT = 0.1; // Not used yet
export const IS_SIMULATION = false; // Not used yet

@@ -43,3 +43,3 @@ import React, { Component, PropTypes } from 'react';

return (
<div>
<div className="price-history-chart">
<ReactHighcharts config={config} />

@@ -46,0 +46,0 @@ </div>

@@ -37,3 +37,3 @@ import React, { Component, PropTypes } from 'react';

// market exists
nodes.push(<Basics key="bascis" {...p.market} />);
nodes.push(<Basics key="basics" {...p.market} />);

@@ -40,0 +40,0 @@ // report form

import {
TRADING_FEE_DEFAULT,
TAKER_FEE_DEFAULT,
MAKER_FEE_DEFAULT,

@@ -21,3 +21,3 @@ INITIAL_LIQUIDITY_DEFAULT,

isValid: true,
tradingFeePercent: TRADING_FEE_DEFAULT,
takerFee: TAKER_FEE_DEFAULT,
makerFee: MAKER_FEE_DEFAULT,

@@ -90,5 +90,4 @@ initialLiquidity: INITIAL_LIQUIDITY_DEFAULT,

form.tradingFeePercent = makeNumber(form.tradingFeePercent, '%');
form.takerFeePercent = makeNumber(form.takerFee, '%');
form.makerFeePercent = makeNumber(form.makerFee, '%');
form.takerFeePercent = makeNumber(100 - form.makerFee, '%');
form.bestStartingQuantityFormatted = makeNumber(form.bestStartingQuantity, 'Shares', true);

@@ -95,0 +94,0 @@ form.startingQuantityFormatted = makeNumber(form.startingQuantity, 'Shares', true);

@@ -8,3 +8,3 @@ import { assert } from 'chai';

export function step1(actual){
function step1(actual){
describe('augur-ui-react-components createMarketForm step-1 initial state', () => {

@@ -33,3 +33,3 @@ it('should receive step and be a number', () => {

export function step2(actual){
function step2(actual){
describe(`augur-ui-react-components createMarketForm step-2 ${actual.type} market initial state`, () => {

@@ -89,3 +89,3 @@ it('should receive type and be a string', () => {

export function step3(actual){
function step3(actual){
describe('augur-ui-react-components createMarketForm step-3 initial state', () => {

@@ -109,4 +109,9 @@ it('should receive description and be a string', () => {

export function step4(actual){
function step4(actual){
describe('augur-ui-react-components createMarketForm step-4 initial state', () => {
it('should receive takerFee and be a number', () => {
assert.isDefined(actual.takerFee, 'makerFee is not defined');
assert.isNumber(actual.takerFee, 'makerFee is not a number');
});
it('should receive makerFee and be a number', () => {

@@ -150,3 +155,3 @@ assert.isDefined(actual.makerFee, 'makerFee is not defined');

export function step5(actual){
function step5(actual){
describe('augur-ui-react-components createMarketForm step-5 initial state', () => {

@@ -169,8 +174,14 @@ it('should receive description and be a string', () => {

it('should receive tradingFeePercent and be an object with correct shape', () => {
assert.isDefined(actual.tradingFeePercent, 'tradingFeePercent is not defined');
assert.isObject(actual.tradingFeePercent, 'tradingFeePercent is not an object');
percentNumberShape(actual.tradingFeePercent);
it('should receive takerFeePercent and be an object with correct shape', () => {
assert.isDefined(actual.takerFeePercent, 'takerFeePercent is not defined');
assert.isObject(actual.takerFeePercent, 'takerFeePercent is not an object');
percentNumberShape(actual.takerFeePercent);
});
it('should receive makerFeePercent and be an object with correct shape', () => {
assert.isDefined(actual.makerFeePercent, 'makerFeePercent is not defined');
assert.isObject(actual.makerFeePercent, 'makerFeePercent is not an object');
percentNumberShape(actual.makerFeePercent);
});
it('should receive creatingMarket and be a boolean', () => {

@@ -187,14 +198,2 @@ assert.isDefined(actual.creatingMarket, 'creatingMarket is not defined');

it('should receive makerFeePercent and be an object with correct shape', () => {
assert.isDefined(actual.makerFeePercent, 'makerFeePercent is not defined');
assert.isObject(actual.makerFeePercent, 'makerFeePercent is not an object');
percentNumberShape(actual.makerFeePercent);
});
it('should receive takerFeePercent and be an object with correct shape', () => {
assert.isDefined(actual.takerFeePercent, 'takerFeePercent is not defined');
assert.isObject(actual.takerFeePercent, 'takerFeePercent is not an object');
percentNumberShape(actual.takerFeePercent);
});
it('should receive initialFairPrices and be an object with correct shape', () => {

@@ -224,2 +223,10 @@ assert.isDefined(actual.initialFairPrices, 'initialFairPrices is not defined');

});
}
}
module.exports = {
step1,
step2,
step3,
step4,
step5
};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc