conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
/*
self.writeHead(code, header) removed to allow connect.compress() perform static HTML files compression.
Before it was work only for static asserts because of response header overwriting.
Instead we do set response status and header with two separate methods self.statusCode and self.setHeader(name, value);
*/
self.statusCode = code;
self.setHeader('Content-Length', Buffer.byteLength(html));
self.setHeader('Content-Type', 'text/html');
self.end(html);
=======
self.writeHead(code, {
'Content-Length': Buffer.byteLength(html),
'Content-Type': 'text/html; charset=UTF-8'
});
return self.end(html);
>>>>>>>
/*
self.writeHead(code, header) removed to allow connect.compress() perform static HTML files compression.
Before it was work only for static asserts because of response header overwriting.
Instead we do set response status and header with two separate methods self.statusCode and self.setHeader(name, value);
*/
self.writeHead(code, {
'Content-Length': Buffer.byteLength(html),
'Content-Type': 'text/html; charset=UTF-8'
});
self.end(html); |
<<<<<<<
// Do not cache any JSON files - see
// https://bugs.ecmascript.org/show_bug.cgi?id=87
=======
//Do not cache any JSON files - see https://bugs.ecmascript.org/show_bug.cgi?id=87
>>>>>>>
// Do not cache any JSON files - see
// https://bugs.ecmascript.org/show_bug.cgi?id=87
<<<<<<<
scriptCache = {}, // Holds the various includes required to
// run certain sputnik tests.
instance = this;
/* Called by the child window to notify that the test has
* finished. This function call is put in a separate script block
* at the end of the page so errors in the test script block
* should not prevent this function from being called.
=======
scriptCache = {}, // Holds the various includes required to run certain tests.
instance = this,
errorDetectorFileContents,
simpleTestAPIContents,
globalScopeContents,
harnessDir = "resources/scripts/global/";
$.ajax({async: false,
dataType: "text",
success: function(data){errorDetectorFileContents = data;},
url:harnessDir+"ed.js"});
$.ajax({async: false,
dataType: "text",
success: function(data){simpleTestAPIContents = data;},
url:harnessDir+"sta.js"});
$.ajax({async: false,
dataType: "text",
success: function(data){globalScopeContents = data;},
url:harnessDir+"gs.js"});
/* Called by the child window to notify that the test has finished. This function call is put in a separate script
* block at the end of the page so errors in the test script block should not prevent this function from being
* called.
>>>>>>>
scriptCache = {}, // Holds the various includes required to run certain tests.
instance = this,
errorDetectorFileContents,
simpleTestAPIContents,
globalScopeContents,
harnessDir = "resources/scripts/global/";
$.ajax({async: false,
dataType: "text",
success: function(data){errorDetectorFileContents = data;},
url:harnessDir+"ed.js"});
$.ajax({async: false,
dataType: "text",
success: function(data){simpleTestAPIContents = data;},
url:harnessDir+"sta.js"});
$.ajax({async: false,
dataType: "text",
success: function(data){globalScopeContents = data;},
url:harnessDir+"gs.js"});
/* Called by the child window to notify that the test has
* finished. This function call is put in a separate script block
* at the end of the page so errors in the test script block
* should not prevent this function from being called.
<<<<<<<
if(typeof currentTest.result === "undefined") {
// We didn't get a call to testRun, which likely means the
// test failed to load.
=======
if((typeof currentTest.result) === "undefined") {
// We didn't get a call to testRun, which likely means the test failed to load.
>>>>>>>
if((typeof currentTest.result) === "undefined") {
// We didn't get a call to testRun, which likely means the
// test failed to load.
<<<<<<<
currentTest.error = currentTest.error.name + ": " +
currentTest.error.message;
=======
currentTest.error = currentTest.error.name + ": " + currentTest.error.message;
>>>>>>>
currentTest.error = currentTest.error.name + ": " + currentTest.error.message;
<<<<<<<
this.run = function(id, code) {
// find all of the $INCLUDE statements
var includes = code.match(/\$INCLUDE\(([^\)]+)\)/g),
include;
// default test, in case it doesn't get registered.
currentTest = {id: id};
=======
this.run = function (test, code) {
currentTest = { id: test.id,
path: test.path,
code: code,
}; // default test, in case it doesn't get registered.
var isGlobalTest = GlobalScopeTests[test.path] !== undefined;
>>>>>>>
this.run = function (test, code) {
currentTest = { id: test.id,
path: test.path,
code: code,
}; // default test, in case it doesn't get registered.
var isGlobalTest = GlobalScopeTests[test.path] !== undefined;
<<<<<<<
doc.writeln("<script type='text/javascript'>" +
scriptCache[include] + "</script>");
=======
idoc.writeln("<script type='text/javascript'>" + scriptCache[include] + "</script>");
>>>>>>>
idoc.writeln("<script type='text/javascript'>" + scriptCache[include] + "</script>");
<<<<<<<
doc.writeln("<script type='text/javascript'>" +
PickledSimpleTestAPIs + "</script>");
=======
//idoc.writeln("<script type='text/javascript' src='harness/sta.js'>" + "</script>");
idoc.writeln("<script type='text/javascript'>");
idoc.writeln(simpleTestAPIContents);
idoc.writeln("</script>");
>>>>>>>
//idoc.writeln("<script type='text/javascript' src='harness/sta.js'>" + "</script>");
idoc.writeln("<script type='text/javascript'>");
idoc.writeln(simpleTestAPIContents);
idoc.writeln("</script>");
<<<<<<<
// Write ES5Harness.registerTest and fnGlobalObject, which
// returns the global object, and the testFinished call.
doc.writeln(
"<script type='text/javascript'>" +
"ES5Harness = {};" +
"ES5Harness.registerTest = function(test) {" +
" var error;" +
" if(test.precondition && !test.precondition()) {" +
" testRun(test.id, " +
"test.path, " +
"test.description, " +
"test.test.toString()," +
"typeof test.precondition !== 'undefined' ? " +
"test.precondition.toString() : '', " +
"'fail', " +
"'Precondition Failed');" +
" } else {" +
" var testThis = " +
"test.strict===undefined ? window : undefined;" +
" try { " +
"var res = test.test.call(testThis); " +
"} catch(e) { res = 'fail'; error = e; }" +
" var retVal = /^s/i.test(test.id) ? " +
"(res === true || typeof res === 'undefined' ? " +
"'pass' : 'fail') : " +
"(res === true ? 'pass' : 'fail');" +
" testRun(test.id, " +
"test.path, " +
"test.description, " +
"test.test.toString(), " +
"typeof test.precondition !== 'undefined' ? " +
"test.precondition.toString() : '', " +
"retVal, " +
"error);" +
" }" +
"}</script>" +
"<script type='text/javascript'>" + code + "</script>");
=======
idoc.writeln("<script type='text/javascript'>" + code + "</script>");
idoc.writeln("<script type='text/javascript' defer>testFinished();" + "</script>");
>>>>>>>
idoc.writeln("<script type='text/javascript'>" + code + "</script>");
idoc.writeln("<script type='text/javascript' defer>testFinished();" + "</script>");
<<<<<<<
* * onLoadingNextSection(path): Called after a request is sent for
* the next section xml, with the path to that xml.
* * onInitialized(totalTests, version, date): Called after the
* testcaseslist.xml is loaded and parsed.
* * onTestReady(id, code): Called when a test is ready with the
* test's id and code.
=======
* * onLoadingNextSection(path): Called after a request is sent for the next section json, with the path to that json.
* * onInitialized(totalTests, version, date): Called after the testcases.json is loaded and parsed.
* * onTestReady(id, code): Called when a test is ready with the test's id and code.
>>>>>>>
* * onLoadingNextSection(path): Called after a request is sent for the next section json, with the path to that json.
* * onInitialized(totalTests, version, date): Called after the testcases.json is loaded and parsed.
* * onTestReady(id, code): Called when a test is ready with the
* test's id and code. |
<<<<<<<
return (
<div className="tx-nav-link-wrapper">
{this.props.row.step && this.props.row.step.txid &&
<div className="tx-link">
<span className="type">TX</span>
<span className="txid" onClick={this.click.bind(this, this.props.row.step.txid)}>{this.props.row.step.txidAbbr} ({this.props.row.step.txid})</span>
=======
if (this.props.row.step && this.props.row.step.txid) {
return (
<div className="tx-nav-link-wrapper">
{this.props.row.step && this.props.row.step.txid &&
<div className="tx-link">
<span className="type">TX</span>
<span className="txid" onClick={this.click.bind(this, this.props.row.step.txid)}>{this.props.row.step.txid}</span>
</div>
}
>>>>>>>
if (this.props.row.step && this.props.row.step.txid) {
return (
<div className="tx-nav-link-wrapper">
{this.props.row.step && this.props.row.step.txid &&
<div className="tx-link">
<span className="type">TX</span>
<span className="txid" onClick={this.click.bind(this, this.props.row.step.txid)}>{this.props.row.step.txidAbbr} ({this.props.row.step.txid})</span>
</div>
} |
<<<<<<<
this.edgeFlowPath.style("pointer-events", "auto");
this.edgeFlowPath.on("click", that.edgeClicked);
function styleAnimateEdge(d, edge) {
const tps = (d.count / d.period);
let step = getStepCountByTps(tps, "low");
if (step < 4) step = 4;
if (step > 250) step = 250;
let flow = step / 20;
if (edge.prevStepCount && step < edge.prevStepCount * 1.5 && step > edge.prevStepCount * 0.7) {
return edge.prevStyle;
} else {
edge.prevStepCount = step;
edge.prevStyle = `flow ${flow}s infinite steps(${step})`;
return edge.prevStyle;
}
}
//TODO 어딘가에다 옵션으로...
function getStepCountByTps(tps, tpsMode) {
if (tpsMode === "normal") {
return Math.round(71 * (tps ** (-0.452)));
} else if (tpsMode === "low") {
return Math.round(55 * (tps ** (-0.529)));
} else if (tpsMode === "high") {
return Math.round(150 * (tps ** (-0.421)));
}
return Math.round(71 * (tps ** (-0.452)));
}
=======
>>>>>>>
this.edgeFlowPath.style("pointer-events", "auto");
this.edgeFlowPath.on("click", that.edgeClicked); |
<<<<<<<
import MixinLocalStorage from "react-localstorage";
=======
import Title from 'react-title-component'
>>>>>>>
import MixinLocalStorage from "react-localstorage";
import Title from 'react-title-component';
<<<<<<<
timeType: 0,
notification: false,
vibrate: false,
audio: false
=======
timeType: 0,
title: ''
>>>>>>>
timeType: 0,
notification: false,
vibrate: false,
audio: false,
title: ''
<<<<<<<
<input type="checkbox" ref="notification" id="notification" checked={this.state.notification} onChange={this.save}/>
<label for="notification"></label>
=======
<input type="checkbox" ref="notification" id="notification"/>
<label htmlFor="notification"></label>
>>>>>>>
<input type="checkbox" ref="notification" id="notification" checked={this.state.notification} onChange={this.save}/>
<label for="notification"></label>
<<<<<<<
<input type="checkbox" ref="audio" id="audio" checked={this.state.audio} onChange={this.save}/>
<label for="audio"></label>
=======
<input type="checkbox" ref="audio" id="audio"/>
<label htmlFor="audio"></label>
>>>>>>>
<input type="checkbox" ref="audio" id="audio" checked={this.state.audio} onChange={this.save}/>
<label for="audio"></label>
<<<<<<<
<input type="checkbox" ref="vibrate" id="vibrate" checked={this.state.vibrate} onChange={this.save}/>
<label for="vibrate"></label>
=======
<input type="checkbox" ref="vibrate" id="vibrate"/>
<label htmlFor="vibrate"></label>
>>>>>>>
<input type="checkbox" ref="vibrate" id="vibrate" checked={this.state.vibrate} onChange={this.save}/>
<label for="vibrate"></label> |
<<<<<<<
var OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin')
=======
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
>>>>>>>
var OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin')
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin |
<<<<<<<
self.child.call('goto', url, headers, fn);
=======
child.call('goto', url, headers, this.optionGotoTimeout, fn);
>>>>>>>
self.child.call('goto', url, headers, this.optionGotoTimeout, fn); |
<<<<<<<
var _waitMsPassed = 0;
var _timeoutMs = 250;
function waitfn (self, fn, done) {
self._evaluate(fn, function (err, result) {
=======
function waitfn (self, fn/**, arg1, arg2..., done**/) {
var args = sliced(arguments);
var done = args[args.length-1];
var waitDone = function (err, result) {
>>>>>>>
var _waitMsPassed = 0;
var _timeoutMs = 250;
function waitfn (self, fn/**, arg1, arg2..., done**/) {
self._evaluate(fn, function (err, result) {
var args = sliced(arguments);
var done = args[args.length-1];
var waitDone = function (err, result) {
<<<<<<<
waitfn(self, fn, done);
}, _timeoutMs);
=======
waitfn.apply(self, args);
}, 250);
>>>>>>>
waitfn.apply(self, args);
}, _timeoutMs); |
<<<<<<<
// max execution time for `.evaluate()`
const DEFAULT_EXECUTION_TIMEOUT = 30 * 1000
=======
// Error message when halted
const DEFAULT_HALT_MESSAGE = 'Nightmare Halted';
>>>>>>>
// max execution time for `.evaluate()`
const DEFAULT_EXECUTION_TIMEOUT = 30 * 1000
// Error message when halted
const DEFAULT_HALT_MESSAGE = 'Nightmare Halted'; |
<<<<<<<
parent.respondTo('goto', function(url, headers, timeout, done) {
=======
parent.respondTo('goto', function(url, headers, done) {
if (!url || typeof url !== 'string') {
return done('goto: `url` must be a non-empty string');
}
>>>>>>>
parent.respondTo('goto', function(url, headers, timeout, done) {
if (!url || typeof url !== 'string') {
return done('goto: `url` must be a non-empty string');
}
<<<<<<<
// javascript: URLs *may* trigger page loads; wait a bit to see
if (protocol === 'javascript:') {
setTimeout(function() {
if (!win.webContents.isLoadingMainFrame()) {
done(null, {
url: url,
code: 200,
method: 'GET',
referrer: win.webContents.getURL(),
headers: {}
});
}
}, 10);
}
}
var protocol = urlFormat.parse(url).protocol;
canLoadProtocol(protocol, function startLoad(canLoad) {
if (canLoad) {
parent.emit('log',
`Navigating: "${url}",
headers: ${extraHeaders || '[none]'},
timeout: ${timeout}`);
return startLoading();
=======
// javascript: URLs *may* trigger page loads; wait a bit to see
if (protocol === 'javascript:') {
setTimeout(function() {
if (!win.webContents.isLoadingMainFrame()) {
done(null, {
url: url,
code: 200,
method: 'GET',
referrer: win.webContents.getURL(),
headers: {}
});
}
}, 10);
}
return;
>>>>>>>
// javascript: URLs *may* trigger page loads; wait a bit to see
if (protocol === 'javascript:') {
setTimeout(function() {
if (!win.webContents.isLoadingMainFrame()) {
done(null, {
url: url,
code: 200,
method: 'GET',
referrer: win.webContents.getURL(),
headers: {}
});
}
}, 10);
}
}
var protocol = urlFormat.parse(url).protocol;
canLoadProtocol(protocol, function startLoad(canLoad) {
if (canLoad) {
parent.emit('log',
`Navigating: "${url}",
headers: ${extraHeaders || '[none]'},
timeout: ${timeout}`);
return startLoading(); |
<<<<<<<
if( this.detachedRendering )
var fragmentContainer = document.createDocumentFragment();
=======
>>>>>>>
var fragmentContainer;
if( this.detachedRendering )
fragmentContainer = document.createDocumentFragment();
<<<<<<<
if( this.detachedRendering )
fragmentContainer.appendChild( thisModelViewWrapped[0] );
else
modelViewContainerEl.append( thisModelViewWrapped );
=======
modelViewContainerEl.append( thisModelViewWrapped );
>>>>>>>
if( this.detachedRendering )
fragmentContainer.appendChild( thisModelViewWrapped[0] );
else
modelViewContainerEl.append( thisModelViewWrapped );
<<<<<<<
if( this.detachedRendering )
modelViewContainerEl.append( fragmentContainer );
=======
>>>>>>>
if( this.detachedRendering )
modelViewContainerEl.append( fragmentContainer ); |
<<<<<<<
SevenSegDisplay.prototype.layoutProperties = {
rightDimensionX : 20,
leftDimensionX : 15,
upDimensionY : 42,
downDimensionY: 10
}
SevenSegDisplay.prototype.layoutDrawSegment = function (x1, y1, x2, y2, color, xxSegment, yySegment) {
if (color == undefined) color = "lightgrey";
ctx = simulationArea.context;
ctx.beginPath();
ctx.strokeStyle = color;
ctx.lineWidth = correctWidth(3);
xx = xxSegment;
yy = yySegment;
moveTo(ctx, x1, y1, xx, yy, this.direction);
lineTo(ctx, x2, y2, xx, yy, this.direction);
ctx.closePath();
ctx.stroke();
}
SevenSegDisplay.prototype.layoutDraw = function (xOffset = 0, yOffset = 0) {
ctx = simulationArea.context;
var xx = this.subcircuitMetadata.x + xOffset;
var yy = this.subcircuitMetadata.y + yOffset;
this.layoutDrawSegment(10, -20, 10, -38, ["lightgrey", "red"][this.b.value], xx, yy);
this.layoutDrawSegment(10, -17, 10, 1, ["lightgrey", "red"][this.c.value], xx, yy);
this.layoutDrawSegment(-10, -20, -10, -38, ["lightgrey", "red"][this.f.value], xx, yy);
this.layoutDrawSegment(-10, -17, -10, 1, ["lightgrey", "red"][this.e.value], xx, yy);
this.layoutDrawSegment(-8, -38, 8, -38, ["lightgrey", "red"][this.a.value], xx, yy);
this.layoutDrawSegment(-8, -18, 8, -18, ["lightgrey", "red"][this.g.value], xx, yy);
this.layoutDrawSegment(-8, 1, 8, 1, ["lightgrey", "red"][this.d.value], xx, yy);
ctx.beginPath();
var dotColor = ["lightgrey", "red"][this.dot.value] || "lightgrey"
ctx.strokeStyle = dotColor;
rect(ctx, xx + 13, yy + 5, 1, 1);
ctx.stroke();
ctx.beginPath();
ctx.strokeStyle = "black";
ctx.lineWidth = correctWidth(1);
rect2(ctx, -15, -42, 33, 51, xx, yy, this.direction);
ctx.stroke();
}
=======
SevenSegDisplay.prototype.generateVerilog = function () {
return `
always @ (*)
$display("SevenSegDisplay:${this.verilogLabel}.abcdefg. = %b%b%b%b%b%b%b%b}",
${this.a.verilogLabel}, ${this.b.verilogLabel}, ${this.c.verilogLabel}, ${this.d.verilogLabel}, ${this.e.verilogLabel}, ${this.f.verilogLabel}, ${this.g.verilogLabel}, ${this.dot.verilogLabel});`;
}
>>>>>>>
<<<<<<<
SixteenSegDisplay.prototype.layoutProperties = {
rightDimensionX : 20,
leftDimensionX : 15,
upDimensionY : 42,
downDimensionY: 10
}
SixteenSegDisplay.prototype.layoutDrawSegment = function (x1, y1, x2, y2, color, xxSegment, yySegment) {
if (color == undefined) color = "lightgrey";
ctx = simulationArea.context;
ctx.beginPath();
ctx.strokeStyle = color;
ctx.lineWidth = correctWidth(3);
xx = xxSegment;
yy = yySegment;
moveTo(ctx, x1, y1, xx, yy, this.direction);
lineTo(ctx, x2, y2, xx, yy, this.direction);
ctx.closePath();
ctx.stroke();
}
SixteenSegDisplay.prototype.layoutDrawSegmentSlant = function (x1, y1, x2, y2, color, xxSegment, yySegment) {
if (color == undefined) color = "lightgrey";
ctx = simulationArea.context;
ctx.beginPath();
ctx.strokeStyle = color;
ctx.lineWidth = correctWidth(2);
xx = xxSegment;
yy = yySegment;
moveTo(ctx, x1, y1, xx, yy, this.direction);
lineTo(ctx, x2, y2, xx, yy, this.direction);
ctx.closePath();
ctx.stroke();
}
SixteenSegDisplay.prototype.layoutDraw = function (xOffset = 0, yOffset = 0) {
ctx = simulationArea.context;
var xx = this.subcircuitMetadata.x + xOffset;
var yy = this.subcircuitMetadata.y + yOffset;
var color = ["lightgrey", "red"];
var value = this.input1.value;
this.layoutDrawSegment(-10, -38, 0, -38, ["lightgrey", "red"][(value >> 15) & 1], xx, yy); //a1
this.layoutDrawSegment(10, -38, 0, -38, ["lightgrey", "red"][(value >> 14) & 1], xx, yy); //a2
this.layoutDrawSegment(11.5, -19, 11.5, -36, ["lightgrey", "red"][(value >> 13) & 1], xx, yy); //b
this.layoutDrawSegment(11.5, 2, 11.5, -15, ["lightgrey", "red"][(value >> 12) & 1], xx, yy); //c
this.layoutDrawSegment(-10, 4, 0, 4, ["lightgrey", "red"][(value >> 11) & 1], xx, yy); //d1
this.layoutDrawSegment(10, 4, 0, 4, ["lightgrey", "red"][(value >> 10) & 1], xx, yy); //d2
this.layoutDrawSegment(-11.5, 2, -11.5, -15, ["lightgrey", "red"][(value >> 9) & 1], xx, yy); //e
this.layoutDrawSegment(-11.5, -36, -11.5, -19, ["lightgrey", "red"][(value >> 8) & 1], xx, yy); //f
this.layoutDrawSegment(-10, -17, 0, -17, ["lightgrey", "red"][(value >> 7) & 1], xx, yy); //g1
this.layoutDrawSegment(10, -17, 0, -17, ["lightgrey", "red"][(value >> 6) & 1], xx, yy); //g2
this.layoutDrawSegmentSlant(0, -17, -9, -36, ["lightgrey", "red"][(value >> 5) & 1], xx, yy); //h
this.layoutDrawSegment(0, -36, 0, -19, ["lightgrey", "red"][(value >> 4) & 1], xx, yy); //i
this.layoutDrawSegmentSlant(0, -17, 9, -36, ["lightgrey", "red"][(value >> 3) & 1], xx, yy); //j
this.layoutDrawSegmentSlant(0, -17, 9, 0, ["lightgrey", "red"][(value >> 2) & 1], xx, yy); //k
this.layoutDrawSegment(0, -17, 0, 2, ["lightgrey", "red"][(value >> 1) & 1], xx, yy); //l
this.layoutDrawSegmentSlant(0, -17, -9, 0, ["lightgrey", "red"][(value >> 0) & 1], xx, yy); //m
ctx.beginPath();
var dotColor = ["lightgrey", "red"][this.dot.value] || "lightgrey"
ctx.strokeStyle = dotColor;
rect(ctx, xx + 13, yy + 5, 1, 1);
ctx.stroke();
ctx.beginPath();
ctx.strokeStyle = "black";
ctx.lineWidth = correctWidth(1);
rect2(ctx, -15, -42, 33, 51, xx, yy, this.direction);
ctx.stroke();
}
=======
SixteenSegDisplay.prototype.generateVerilog = function () {
return `
always @ (*)
$display("SixteenSegDisplay:{${this.input1.verilogLabel},${this.dot.verilogLabel}} = {%16b,%1b}", ${this.input1.verilogLabel}, ${this.dot.verilogLabel});`;
}
>>>>>>>
<<<<<<<
if (this.inp1.verilogLabel != "" && this.outputs[0].verilogLabel == "") {
=======
// Splitter
this.isSplitter = true;
for (var j = 0; j < this.outputs.length; j++) {
>>>>>>>
<<<<<<<
} else if (this.inp1.verilogLabel == "" && this.outputs[0].verilogLabel != "") {
var label = "{" + this.outputs.map((x) => {
return x.verilogLabel
}).join(",") + "}";
if (this.inp1.verilogLabel != label) {
this.inp1.verilogLabel = label;
this.scope.stack.push(this.inp1);
}
=======
>>>>>>>
<<<<<<<
=======
//console.log(this.state);
>>>>>>>
<<<<<<<
DigitalLed.prototype.layoutDraw = function(xOffset = 0, yOffset = 0) {
ctx = simulationArea.context;
var xx = this.subcircuitMetadata.x + xOffset;
var yy = this.subcircuitMetadata.y + yOffset;
ctx.strokeStyle = "#090a0a";
ctx.fillStyle = ["rgba(227,228,229,0.8)", this.actualColor][this.inp1.value || 0];
ctx.lineWidth = correctWidth(1);
ctx.beginPath();
drawCircle2(ctx, 0, 0, 6, xx, yy, this.direction);
ctx.stroke();
if ((this.hover && !simulationArea.shiftDown) || simulationArea.lastSelected == this || simulationArea.multipleObjectSelections.contains(this)) ctx.fillStyle = "rgba(255, 255, 32,0.8)";
ctx.fill();
}
=======
//Use $display
DigitalLed.prototype.generateVerilog = function () {
var label = this.label ? this.verilogLabel : this.inp1.verilogLabel;
return `
always @ (*)
$display("DigitalLed:${label}=%d", ${this.inp1.verilogLabel});`;
}
/* Outdated, was translating into Output
DigitalLed.prototype.generateVerilog = function () {
return "assign " + this.label + " = " + this.inp1.verilogLabel + ";"
}
*/
//DigitalLed translated into $display
// DigitalLed.prototype.generateVerilog = function () {
// var output = "";
// output += " always @ (" + this.inp1.verilogLabel + ")\n";
// output += " $display(\"" + this.inp1.verilogLabel + " = %d\", "
// + this.inp1.verilogLabel + ");";
// return output;
// }
>>>>>>>
<<<<<<<
VariableLed.prototype.generateVerilog = function () {
return `
always @ (*)
$display("VeriableLed:${this.inp1.verilogLabel}=%d", ${this.inp1.verilogLabel});`;
}
VariableLed.prototype.layoutDraw = function(xOffset = 0, yOffset = 0) {
ctx = simulationArea.context;
var xx = this.subcircuitMetadata.x + xOffset;
var yy = this.subcircuitMetadata.y + yOffset;
var c = this.inp1.value;
var alpha = c / 255;
ctx.strokeStyle = "#090a0a";
ctx.fillStyle = ["rgba(255,29,43," + alpha + ")", "rgba(227, 228, 229, 0.8)"][(c === undefined || c == 0) + 0];
ctx.lineWidth = correctWidth(1);
ctx.beginPath();
drawCircle2(ctx, 0, 0, 6, xx, yy, this.direction);
ctx.stroke();
if ((this.hover && !simulationArea.shiftDown) || simulationArea.lastSelected == this || simulationArea.multipleObjectSelections.contains(this)) ctx.fillStyle = "rgba(255, 255, 32,0.8)";
ctx.fill();
}
=======
VariableLed.prototype.generateVerilog = function () {
return `
always @ (*)
$display("VeriableLed:${this.inp1.verilogLabel}=%d", ${this.inp1.verilogLabel});`;
}
>>>>>>>
<<<<<<<
Button.verilogInstructions = function() {
return `Button - Buttons are not natively supported in verilog, consider using Inputs instead\n`;
}
Button.prototype.verilogBaseType = function() {
return this.verilogName() + (Button.selSizes.length-1);
}
//this code to generate Verilog
Button.prototype.generateVerilog = function () {
Button.selSizes.push(this.data);
return CircuitElement.prototype.generateVerilog.call(this);
}
//This code to determine what sizes are used to generate the needed modules
Button.selSizes = [];
//generate the needed modules
Button.moduleVerilog = function () {
var output = "";
for (var i = 0; i < Button.selSizes.length; i++) {
output += `// Skeleton for Button${i}
/*
module Button${i}(out);
output reg out;
initial begin
//do something with the button here
end
endmodule
*/
`;
}
return output;
}
//reset the sized before Verilog generation
Button.resetVerilog = function () {
Button.selSizes = [];
}
Button.prototype.layoutDraw = function (xOffset = 0, yOffset = 0) {
ctx = simulationArea.context;
var xx = this.subcircuitMetadata.x + xOffset;
var yy = this.subcircuitMetadata.y + yOffset;
ctx.fillStyle = "#ddd";
ctx.strokeStyle = "#353535";
ctx.lineWidth = correctWidth(3);
ctx.beginPath();
drawCircle2(ctx, 0, 0, 6, xx, yy, this.direction);
ctx.stroke();
if ((this.hover && !simulationArea.shiftDown) || simulationArea.lastSelected == this || simulationArea.multipleObjectSelections.contains(this))
ctx.fillStyle = "rgba(232, 13, 13,0.6)"
if (this.wasClicked)
ctx.fillStyle = "rgba(232, 13, 13,0.8)";
ctx.fill();
}
=======
Button.verilogInstructions = function() {
return `Button - Buttons are not natively supported in verilog, consider using Inputs instead\n`;
}
Button.prototype.verilogBaseType = function() {
return this.verilogName() + (Button.selSizes.length-1);
}
//this code to generate Verilog
Button.prototype.generateVerilog = function () {
Button.selSizes.push(this.data);
return CircuitElement.prototype.generateVerilog.call(this);
}
//This code to determine what sizes are used to generate the needed modules
Button.selSizes = [];
//generate the needed modules
Button.moduleVerilog = function () {
var output = "";
for (var i = 0; i < Button.selSizes.length; i++) {
output += `// Skeleton for Button${i}
/*
module Button${i}(out);
output reg out;
initial begin
//do something with the button here
end
endmodule
*/
`;
}
return output;
}
//reset the sized before Verilog generation
Button.resetVerilog = function () {
Button.selSizes = [];
}
>>>>>>>
<<<<<<<
RGBLed.prototype.generateVerilog = function () {
return `
always @ (*)
$display("RGBLed:{${this.inp1.verilogLabel},${this.inp2.verilogLabel},${this.inp3.verilogLabel}} = {%d,%d,%d}", ${this.inp1.verilogLabel}, ${this.inp2.verilogLabel}, ${this.inp3.verilogLabel});`;
}
RGBLed.prototype.layoutDraw = function(xOffset = 0, yOffset = 0) {
ctx = simulationArea.context;
var xx = this.subcircuitMetadata.x + xOffset;
var yy = this.subcircuitMetadata.y + yOffset;
var dimensionSize = 6;
// var size = this.subcircuitMetadata.size;
// if (size === "medium")
// dimensionSize = 7;
// else if (size === "Large")
// dimensionSize = 10;
var a = this.inp1.value;
var b = this.inp2.value;
var c = this.inp3.value;
ctx.strokeStyle = "#090a0a";
ctx.fillStyle = ["rgba(" + a + ", " + b + ", " + c + ", 0.8)", "rgba(227, 228, 229, 0.8)"][((a === undefined || b === undefined || c === undefined)) + 0]
//ctx.fillStyle = ["rgba(200, 200, 200, 0.3)","rgba(227, 228, 229, 0.8)"][((a === undefined || b === undefined || c === undefined) || (a == 0 && b == 0 && c == 0)) + 0];
ctx.lineWidth = correctWidth(1);
ctx.beginPath();
drawCircle2(ctx, 0, 0, dimensionSize, xx, yy, this.direction);
ctx.stroke();
if ((this.hover && !simulationArea.shiftDown) || simulationArea.lastSelected == this || simulationArea.multipleObjectSelections.contains(this)) ctx.fillStyle = "rgba(255, 255, 32,0.8)";
ctx.fill();
}
=======
RGBLed.prototype.generateVerilog = function () {
return `
always @ (*)
$display("RGBLed:{${this.inp1.verilogLabel},${this.inp2.verilogLabel},${this.inp3.verilogLabel}} = {%d,%d,%d}", ${this.inp1.verilogLabel}, ${this.inp2.verilogLabel}, ${this.inp3.verilogLabel});`;
}
>>>>>>>
<<<<<<<
SquareRGBLed.prototype.layoutProperties = {
rightDimensionX: 15,
leftDimensionX: 0,
upDimensionY: 15,
downDimensionY:0
}
SquareRGBLed.prototype.layoutDraw = function(xOffset = 0, yOffset = 0) {
var ctx = simulationArea.context;
var xx = this.subcircuitMetadata.x + xOffset;
var yy = this.subcircuitMetadata.y + yOffset;
var r = this.inp1.value;
var g = this.inp2.value;
var b = this.inp3.value;
ctx.strokeStyle = "#d3d4d5";
ctx.fillStyle = (r === undefined && g === undefined && b === undefined) ? "rgb(227, 228, 229)" : "rgb(" + (r || 0) + ", " + (g || 0) + ", " + (b || 0) + ")";
ctx.lineWidth = correctWidth(1);
ctx.beginPath();
rect2(ctx, 0, 0, 15, 15, xx, yy, this.direction);
ctx.stroke();
if ((this.hover && !simulationArea.shiftDown) ||
simulationArea.lastSelected == this ||
simulationArea.multipleObjectSelections.contains(this)) {
ctx.fillStyle = "rgba(255, 255, 32)";
}
ctx.fill();
}
=======
SquareRGBLed.prototype.generateVerilog = function () {
return RGBLed.prototype.generateVerilog.call(this);
}
>>>>>>> |
<<<<<<<
// B) Deploy the VolumeRestrictionTMLogic Contract (Factory used to generate the VolumeRestrictionTM contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(VolumeRestrictionTMLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => {
=======
// B) Deploy the USDTieredSTOLogic Contract (Factory used to generate the USDTieredSTO contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(USDTieredSTOLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => {
>>>>>>>
// B) Deploy the USDTieredSTOLogic Contract (Factory used to generate the USDTieredSTO contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(USDTieredSTOLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => {
// B) Deploy the VolumeRestrictionTMLogic Contract (Factory used to generate the VolumeRestrictionTM contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(VolumeRestrictionTMLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => { |
<<<<<<<
assert.equal(await I_EtherDividendCheckpointFactory.getType.call(), 4);
assert.equal(await I_EtherDividendCheckpointFactory.getVersion.call(), "1.0.0");
=======
assert.equal((await I_EtherDividendCheckpointFactory.getTypes.call())[0], 4);
>>>>>>>
assert.equal((await I_EtherDividendCheckpointFactory.getTypes.call())[0], 4);
assert.equal(await I_EtherDividendCheckpointFactory.getVersion.call(), "1.0.0"); |
<<<<<<<
// B) Deploy the VestingEscrowWalletLogic Contract (Factory used to generate the VestingEscrowWallet contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(VestingEscrowWalletLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => {
// B) Deploy the VestingEscrowWalletFactory Contract (Factory used to generate the VestingEscrowWallet contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(VestingEscrowWalletFactory, PolyToken, 0, 0, 0, VestingEscrowWalletLogic.address, {from: PolymathAccount});
}).then(() => {
=======
// B) Deploy the USDTieredSTOLogic Contract (Factory used to generate the USDTieredSTO contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(USDTieredSTOLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => {
>>>>>>>
// B) Deploy the VestingEscrowWalletLogic Contract (Factory used to generate the VestingEscrowWallet contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(VestingEscrowWalletLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => {
// B) Deploy the USDTieredSTOLogic Contract (Factory used to generate the USDTieredSTO contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(USDTieredSTOLogic, "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", {from: PolymathAccount});
}).then(() => {
// B) Deploy the VestingEscrowWalletFactory Contract (Factory used to generate the VestingEscrowWallet contract and this
// manager attach with the securityToken contract at the time of deployment)
return deployer.deploy(VestingEscrowWalletFactory, PolyToken, 0, 0, 0, VestingEscrowWalletLogic.address, {from: PolymathAccount});
}).then(() => { |
<<<<<<<
let lockUpTransferManagerABI;
=======
let volumeRestrictionTMABI;
>>>>>>>
let lockUpTransferManagerABI;
let volumeRestrictionTMABI;
<<<<<<<
polymathRegistryABI = JSON.parse(require('fs').readFileSync('./build/contracts/PolymathRegistry.json').toString()).abi;
securityTokenRegistryABI = JSON.parse(require('fs').readFileSync('./build/contracts/SecurityTokenRegistry.json').toString()).abi;
featureRegistryABI = JSON.parse(require('fs').readFileSync('./build/contracts/FeatureRegistry.json').toString()).abi;
moduleRegistryABI = JSON.parse(require('fs').readFileSync('./build/contracts/ModuleRegistry.json').toString()).abi;
securityTokenABI = JSON.parse(require('fs').readFileSync('./build/contracts/SecurityToken.json').toString()).abi;
stoInterfaceABI = JSON.parse(require('fs').readFileSync('./build/contracts/ISTO.json').toString()).abi;
cappedSTOABI = JSON.parse(require('fs').readFileSync('./build/contracts/CappedSTO.json').toString()).abi;
usdTieredSTOABI = JSON.parse(require('fs').readFileSync('./build/contracts/USDTieredSTO.json').toString()).abi;
generalTransferManagerABI = JSON.parse(require('fs').readFileSync('./build/contracts/GeneralTransferManager.json').toString()).abi;
manualApprovalTransferManagerABI = JSON.parse(require('fs').readFileSync('./build/contracts/ManualApprovalTransferManager.json').toString()).abi;
countTransferManagerABI = JSON.parse(require('fs').readFileSync('./build/contracts/CountTransferManager.json').toString()).abi;
percentageTransferManagerABI = JSON.parse(require('fs').readFileSync('./build/contracts/PercentageTransferManager.json').toString()).abi;
lockUpTransferManagerABI = JSON.parse(require('fs').readFileSync('./build/contracts/LockUpTransferManager.json').toString()).abi;
generalPermissionManagerABI = JSON.parse(require('fs').readFileSync('./build/contracts/GeneralPermissionManager.json').toString()).abi;
polyTokenABI = JSON.parse(require('fs').readFileSync('./build/contracts/PolyTokenFaucet.json').toString()).abi;
cappedSTOFactoryABI = JSON.parse(require('fs').readFileSync('./build/contracts/CappedSTOFactory.json').toString()).abi;
usdTieredSTOFactoryABI = JSON.parse(require('fs').readFileSync('./build/contracts/USDTieredSTOFactory.json').toString()).abi;
erc20DividendCheckpointABI = JSON.parse(require('fs').readFileSync('./build/contracts/ERC20DividendCheckpoint.json').toString()).abi;
etherDividendCheckpointABI = JSON.parse(require('fs').readFileSync('./build/contracts/EtherDividendCheckpoint.json').toString()).abi;
moduleInterfaceABI = JSON.parse(require('fs').readFileSync('./build/contracts/IModule.json').toString()).abi;
ownableABI = JSON.parse(require('fs').readFileSync('./build/contracts/Ownable.json').toString()).abi;
iSTOABI = JSON.parse(require('fs').readFileSync('./build/contracts/ISTO.json').toString()).abi
iTransferManagerABI = JSON.parse(require('fs').readFileSync('./build/contracts/ITransferManager.json').toString()).abi
moduleFactoryABI = JSON.parse(require('fs').readFileSync('./build/contracts/ModuleFactory.json').toString()).abi;
=======
polymathRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/PolymathRegistry.json`).toString()).abi;
securityTokenRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/SecurityTokenRegistry.json`).toString()).abi;
featureRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/FeatureRegistry.json`).toString()).abi;
moduleRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ModuleRegistry.json`).toString()).abi;
securityTokenABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/SecurityToken.json`).toString()).abi;
stoInterfaceABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ISTO.json`).toString()).abi;
cappedSTOABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/CappedSTO.json`).toString()).abi;
usdTieredSTOABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/USDTieredSTO.json`).toString()).abi;
generalTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/GeneralTransferManager.json`).toString()).abi;
manualApprovalTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ManualApprovalTransferManager.json`).toString()).abi;
countTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/CountTransferManager.json`).toString()).abi;
percentageTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/PercentageTransferManager.json`).toString()).abi;
blacklistTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/BlacklistTransferManager.json`).toString()).abi;
volumeRestrictionTMABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/VolumeRestrictionTM.json`).toString()).abi;
generalPermissionManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/GeneralPermissionManager.json`).toString()).abi;
polyTokenABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/PolyTokenFaucet.json`).toString()).abi;
cappedSTOFactoryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/CappedSTOFactory.json`).toString()).abi;
usdTieredSTOFactoryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/USDTieredSTOFactory.json`).toString()).abi;
erc20DividendCheckpointABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ERC20DividendCheckpoint.json`).toString()).abi;
etherDividendCheckpointABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/EtherDividendCheckpoint.json`).toString()).abi;
moduleInterfaceABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/IModule.json`).toString()).abi;
ownableABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/Ownable.json`).toString()).abi;
iSTOABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ISTO.json`).toString()).abi
iTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ITransferManager.json`).toString()).abi
moduleFactoryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ModuleFactory.json`).toString()).abi;
erc20ABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/DetailedERC20.json`).toString()).abi;
>>>>>>>
polymathRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/PolymathRegistry.json`).toString()).abi;
securityTokenRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/SecurityTokenRegistry.json`).toString()).abi;
featureRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/FeatureRegistry.json`).toString()).abi;
moduleRegistryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ModuleRegistry.json`).toString()).abi;
securityTokenABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/SecurityToken.json`).toString()).abi;
stoInterfaceABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ISTO.json`).toString()).abi;
cappedSTOABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/CappedSTO.json`).toString()).abi;
usdTieredSTOABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/USDTieredSTO.json`).toString()).abi;
generalTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/GeneralTransferManager.json`).toString()).abi;
manualApprovalTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ManualApprovalTransferManager.json`).toString()).abi;
countTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/CountTransferManager.json`).toString()).abi;
percentageTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/PercentageTransferManager.json`).toString()).abi;
blacklistTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/BlacklistTransferManager.json`).toString()).abi;
volumeRestrictionTMABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/VolumeRestrictionTM.json`).toString()).abi;
lockUpTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/LockUpTransferManager.json`).toString()).abi;
generalPermissionManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/GeneralPermissionManager.json`).toString()).abi;
polyTokenABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/PolyTokenFaucet.json`).toString()).abi;
cappedSTOFactoryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/CappedSTOFactory.json`).toString()).abi;
usdTieredSTOFactoryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/USDTieredSTOFactory.json`).toString()).abi;
erc20DividendCheckpointABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ERC20DividendCheckpoint.json`).toString()).abi;
etherDividendCheckpointABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/EtherDividendCheckpoint.json`).toString()).abi;
moduleInterfaceABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/IModule.json`).toString()).abi;
ownableABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/Ownable.json`).toString()).abi;
iSTOABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ISTO.json`).toString()).abi
iTransferManagerABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ITransferManager.json`).toString()).abi
moduleFactoryABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/ModuleFactory.json`).toString()).abi;
erc20ABI = JSON.parse(require('fs').readFileSync(`${__dirname}/../../../build/contracts/DetailedERC20.json`).toString()).abi;
<<<<<<<
lockUpTransferManager: function () {
return lockUpTransferManagerABI;
},
=======
volumeRestrictionTM: function () {
return volumeRestrictionTMABI;
},
>>>>>>>
lockUpTransferManager: function () {
return lockUpTransferManagerABI;
},
volumeRestrictionTM: function () {
return volumeRestrictionTMABI;
}, |
<<<<<<<
const SecurityTokenRegistryProxy = artifacts.require('./SecurityTokenRegistryProxy.sol')
const STVersionProxy001 = artifacts.require('./tokens/STVersionProxy001.sol')
=======
const TickerRegistry = artifacts.require('./TickerRegistry.sol')
const FeatureRegistry = artifacts.require('./FeatureRegistry.sol')
const STFactory = artifacts.require('./tokens/STFactory.sol')
>>>>>>>
const SecurityTokenRegistryProxy = artifacts.require('./SecurityTokenRegistryProxy.sol')
const FeatureRegistry = artifacts.require('./FeatureRegistry.sol')
const STFactory = artifacts.require('./tokens/STFactory.sol')
<<<<<<<
return deployer.deploy(SecurityTokenRegistry, {from: PolymathAccount})
=======
return deployer.deploy(SecurityTokenRegistry, PolymathRegistry.address, STFactory.address, initRegFee, {from: PolymathAccount})
>>>>>>>
return deployer.deploy(SecurityTokenRegistry, {from: PolymathAccount})
<<<<<<<
}).then(()=> {
return deployer.deploy(SecurityTokenRegistryProxy, {from: PolymathAccount});
}).then(()=> {
let bytesProxy = web3.eth.abi.encodeFunctionCall(functionSignature, [PolymathRegistry.address, STVersionProxy001.address, initRegFee, initRegFee, PolyToken, PolymathAccount]);
return SecurityTokenRegistryProxy.at(SecurityTokenRegistryProxy.address).upgradeToAndCall("1.0.0", SecurityTokenRegistry.address, bytesProxy, {from : PolymathAccount});
=======
}).then(() => {
// K) Deploy the FeatureRegistry contract to control feature switches
return deployer.deploy(FeatureRegistry, PolymathRegistry.address, {from: PolymathAccount});
}).then(() => {
// Assign the address into the FeatureRegistry key
return polymathRegistry.changeAddress("FeatureRegistry", FeatureRegistry.address, {from: PolymathAccount});
}).then(() => {
// Update all addresses into the registry contract by calling the function updateFromregistry
return SecurityTokenRegistry.at(SecurityTokenRegistry.address).updateFromRegistry({from: PolymathAccount});
>>>>>>>
}).then(()=> {
return deployer.deploy(SecurityTokenRegistryProxy, {from: PolymathAccount});
}).then(()=> {
let bytesProxy = web3.eth.abi.encodeFunctionCall(functionSignature, [PolymathRegistry.address, STFactory.address, initRegFee, initRegFee, PolyToken, PolymathAccount]);
return SecurityTokenRegistryProxy.at(SecurityTokenRegistryProxy.address).upgradeToAndCall("1.0.0", SecurityTokenRegistry.address, bytesProxy, {from : PolymathAccount});
<<<<<<<
console.log('\n')
console.log('----- Polymath Core Contracts -----')
console.log('*** Polymath Registry Address: ', PolymathRegistry.address, '***')
console.log('*** Module Registry Address: ', ModuleRegistry.address, '***')
console.log('*** Security Token Registry Address: ', SecurityTokenRegistry.address, '***')
console.log('*** Security Token Registry Proxy Address', SecurityTokenRegistryProxy.address, '***')
console.log('*** Capped STO Factory Address: ', CappedSTOFactory.address, '***')
console.log('*** General Permission Manager Factory: ', GeneralPermissionManagerFactory.address, '***')
console.log('*** Count Transfer Manager Factory: ', CountTransferManagerFactory.address, '***')
console.log('*** Percentage Transfer Manager Factory: ', PercentageTransferManagerFactory.address, '***')
console.log('*** ETH Dividends Checkpoint Factory: ', EtherDividendCheckpointFactory.address, '***')
console.log('*** ERC20 Dividends Checkpoint Factory: ', ERC20DividendCheckpointFactory.address, '***')
console.log('-----------------------------------')
console.log('\n')
=======
console.log('\n');
console.log(`
--------------------- Polymath Network Smart Contracts: ---------------------
PolymathRegistry: ${PolymathRegistry.address}
TickerRegistry: ${TickerRegistry.address}
SecurityTokenRegistry: ${SecurityTokenRegistry.address}
ModuleRegistry: ${ModuleRegistry.address}
FeatureRegistry: ${FeatureRegistry.address}
ETHOracle: ${ETHOracle}
POLYOracle: ${POLYOracle}
STFactory: ${STFactory.address}
GeneralTransferManagerFactory: ${GeneralTransferManagerFactory.address}
GeneralPermissionManagerFactory: ${GeneralPermissionManagerFactory.address}
CappedSTOFactory: ${CappedSTOFactory.address}
USDTieredSTOFactory: ${USDTieredSTOFactory.address}
CountTransferManagerFactory: ${CountTransferManagerFactory.address}
PercentageTransferManagerFactory: ${PercentageTransferManagerFactory.address}
ManualApprovalTransferManagerFactory:
${ManualApprovalTransferManagerFactory.address}
EtherDividendCheckpointFactory: ${EtherDividendCheckpointFactory.address}
ERC20DividendCheckpointFactory: ${ERC20DividendCheckpointFactory.address}
-----------------------------------------------------------------------------
`);
console.log('\n');
>>>>>>>
console.log('\n');
console.log(`
--------------------- Polymath Network Smart Contracts: ---------------------
PolymathRegistry: ${PolymathRegistry.address}
SecurityTokenRegistryProxy: ${SecurityTokenRegistryProxy.address}
SecurityTokenRegistry: ${SecurityTokenRegistry.address}
ModuleRegistry: ${ModuleRegistry.address}
FeatureRegistry: ${FeatureRegistry.address}
ETHOracle: ${ETHOracle}
POLYOracle: ${POLYOracle}
STFactory: ${STFactory.address}
GeneralTransferManagerFactory: ${GeneralTransferManagerFactory.address}
GeneralPermissionManagerFactory: ${GeneralPermissionManagerFactory.address}
CappedSTOFactory: ${CappedSTOFactory.address}
USDTieredSTOFactory: ${USDTieredSTOFactory.address}
CountTransferManagerFactory: ${CountTransferManagerFactory.address}
PercentageTransferManagerFactory: ${PercentageTransferManagerFactory.address}
ManualApprovalTransferManagerFactory:
${ManualApprovalTransferManagerFactory.address}
EtherDividendCheckpointFactory: ${EtherDividendCheckpointFactory.address}
ERC20DividendCheckpointFactory: ${ERC20DividendCheckpointFactory.address}
-----------------------------------------------------------------------------
`);
console.log('\n'); |
<<<<<<<
var readlineSync = require('readline-sync');
var chalk = require('chalk');
var moment = require('moment');
var common = require('./common/common_functions');
var contracts = require('./helpers/contract_addresses');
var abis = require('./helpers/contract_abis');
var gbl = require('./common/global');
var whitelist = require('./whitelist');
const { table } = require('table')
=======
const readlineSync = require('readline-sync');
const chalk = require('chalk');
const moment = require('moment');
const common = require('./common/common_functions');
const contracts = require('./helpers/contract_addresses');
const abis = require('./helpers/contract_abis');
const gbl = require('./common/global');
const csvParse = require('./helpers/csv');
///////////////////
// Constants
const WHITELIST_DATA_CSV = './CLI/data/Transfer/GTM/whitelist_data.csv';
>>>>>>>
const readlineSync = require('readline-sync');
const chalk = require('chalk');
const moment = require('moment');
const common = require('./common/common_functions');
const contracts = require('./helpers/contract_addresses');
const abis = require('./helpers/contract_abis');
const gbl = require('./common/global');
const csvParse = require('./helpers/csv');
const { table } = require('table')
///////////////////
// Constants
const WHITELIST_DATA_CSV = './CLI/data/Transfer/GTM/whitelist_data.csv';
<<<<<<<
let options = [];
if (displayInvestors.length > 0) {
options.push(`Show investors`, `Show whitelist data`);
}
options.push('Modify whitelist', 'Modify whitelist from CSV', /*'Modify Whitelist Signed',*/
'Change the default times used when they are zero', `Change issuance address`, 'Change signing address');
=======
let options = ['Check whitelist', 'Modify whitelist', 'Modify whitelist from CSV', /*'Modify Whitelist Signed',*/
`Change issuance address`, 'Change signing address'];
>>>>>>>
let options = [];
if (displayInvestors.length > 0) {
options.push(`Show investors`, `Show whitelist data`);
}
options.push('Modify whitelist', 'Modify whitelist from CSV', /*'Modify Whitelist Signed',*/
'Change the default times used when they are zero', `Change issuance address`, 'Change signing address');
<<<<<<<
case `Show investors`:
console.log('***** List of investors on whitelist *****');
displayInvestors.map(i => console.log(i));
break;
case `Show whitelist data`:
let investorsToShow = readlineSync.question(`Enter the addresses of the investors you want to show (i.e: addr1,addr2,addr3) or leave empty to show them all: `, {
limit: function (input) {
return input === '' || input.split(",").every(a => web3.utils.isAddress(a));
},
limitMessage: `All addresses must be valid`
});
if (investorsToShow === '') {
let whitelistData = await currentTransferManager.methods.getAllInvestorsData().call();
showWhitelistTable(whitelistData[0], whitelistData[1], whitelistData[2], whitelistData[3], whitelistData[4]);
} else {
let investorsArray = investorsToShow.split(',');
let whitelistData = await currentTransferManager.methods.getInvestorsData(investorsArray).call();
showWhitelistTable(investorsArray, whitelistData[0], whitelistData[1], whitelistData[2], whitelistData[3]);
}
break;
case 'Change the default times used when they are zero':
let fromTimeDefault = readlineSync.questionInt(`Enter the default time (Unix Epoch time) used when fromTime is zero: `);
let toTimeDefault = readlineSync.questionInt(`Enter the default time (Unix Epoch time) used when fromTime is zero: `);
let changeDefaultsAction = currentTransferManager.methods.changeDefaults(fromTimeDefault, toTimeDefault);
let changeDefaultsReceipt = await common.sendTransaction(changeDefaultsAction);
let changeDefaultsEvent = common.getEventFromLogs(currentTransferManager._jsonInterface, changeDefaultsReceipt.logs, 'ChangeDefaults');
console.log(chalk.green(`Default times have been updated successfully!`));
break;
=======
case 'Check whitelist':
let investorToCheck = readlineSync.question('Enter the address you want to check: ', {
limit: function (input) {
return web3.utils.isAddress(input);
},
limitMessage: "Must be a valid address"
});
let timeRestriction = await currentTransferManager.methods.whitelist(investorToCheck).call();
console.log(`Sale lockup: ${moment.unix(timeRestriction.fromTime).format('MMMM Do YYYY, HH:mm:ss')}`);
console.log(`Buy lockup: ${moment.unix(timeRestriction.toTime).format('MMMM Do YYYY, HH:mm:ss')}`);
console.log(`KYC expiry time: ${moment.unix(timeRestriction.expiryTime).format('MMMM Do YYYY, HH:mm:ss')}`);
console.log(`Restricted investor: ${timeRestriction.canBuyFromSTO ? 'YES' : 'NO'} `);
break;
>>>>>>>
case `Show investors`:
console.log('***** List of investors on whitelist *****');
displayInvestors.map(i => console.log(i));
break;
case `Show whitelist data`:
let investorsToShow = readlineSync.question(`Enter the addresses of the investors you want to show (i.e: addr1,addr2,addr3) or leave empty to show them all: `, {
limit: function (input) {
return input === '' || input.split(",").every(a => web3.utils.isAddress(a));
},
limitMessage: `All addresses must be valid`
});
if (investorsToShow === '') {
let whitelistData = await currentTransferManager.methods.getAllInvestorsData().call();
showWhitelistTable(whitelistData[0], whitelistData[1], whitelistData[2], whitelistData[3], whitelistData[4]);
} else {
let investorsArray = investorsToShow.split(',');
let whitelistData = await currentTransferManager.methods.getInvestorsData(investorsArray).call();
showWhitelistTable(investorsArray, whitelistData[0], whitelistData[1], whitelistData[2], whitelistData[3]);
}
break;
case 'Change the default times used when they are zero':
let fromTimeDefault = readlineSync.questionInt(`Enter the default time (Unix Epoch time) used when fromTime is zero: `);
let toTimeDefault = readlineSync.questionInt(`Enter the default time (Unix Epoch time) used when fromTime is zero: `);
let changeDefaultsAction = currentTransferManager.methods.changeDefaults(fromTimeDefault, toTimeDefault);
let changeDefaultsReceipt = await common.sendTransaction(changeDefaultsAction);
let changeDefaultsEvent = common.getEventFromLogs(currentTransferManager._jsonInterface, changeDefaultsReceipt.logs, 'ChangeDefaults');
console.log(chalk.green(`Default times have been updated successfully!`));
break;
<<<<<<<
console.log(chalk.yellow(`Data is going to be read from 'data/whitelist_data.csv'. Be sure this file is updated!`));
if (readlineSync.keyInYNStrict(`Do you want to continue?`)) {
await whitelist.executeApp(tokenSymbol);
}
=======
await modifyWhitelistInBatch();
>>>>>>>
await modifyWhitelistInBatch();
<<<<<<<
function showWhitelistTable(investorsArray, fromTimeArray, toTimeArray, expiryTimeArray, canBuyFromSTOArray) {
let dataTable = [['Investor', 'From time', 'To time', 'KYC expiry date', 'Restricted']];
for (let i = 0; i < investorsArray.length; i++) {
dataTable.push([
investorsArray[i],
moment.unix(fromTimeArray[i]).format('MM/DD/YYYY HH:mm'),
moment.unix(toTimeArray[i]).format('MM/DD/YYYY HH:mm'),
moment.unix(expiryTimeArray[i]).format('MM/DD/YYYY HH:mm'),
canBuyFromSTOArray[i] ? 'YES' : 'NO'
]);
}
console.log();
console.log(table(dataTable));
}
=======
async function modifyWhitelistInBatch() {
let csvFilePath = readlineSync.question(`Enter the path for csv data file (${WHITELIST_DATA_CSV}): `, {
defaultInput: WHITELIST_DATA_CSV
});
let batchSize = readlineSync.question(`Enter the max number of records per transaction or batch size (${gbl.constants.DEFAULT_BATCH_SIZE}): `, {
limit: function (input) {
return parseInt(input) > 0;
},
limitMessage: 'Must be greater than 0',
defaultInput: gbl.constants.DEFAULT_BATCH_SIZE
});
let parsedData = csvParse(csvFilePath);
let validData = parsedData.filter(row =>
web3.utils.isAddress(row[0]) &&
moment.unix(row[1]).isValid() &&
moment.unix(row[2]).isValid() &&
moment.unix(row[3]).isValid() &&
typeof row[4] === 'boolean'
);
let invalidRows = parsedData.filter(row => !validData.includes(row));
if (invalidRows.length > 0) {
console.log(chalk.red(`The following lines from csv file are not valid: ${invalidRows.map(r => parsedData.indexOf(r) + 1).join(',')} `));
}
let batches = common.splitIntoBatches(validData, batchSize);
let [investorArray, fromTimesArray, toTimesArray, expiryTimeArray, canBuyFromSTOArray] = common.transposeBatches(batches);
for (let batch = 0; batch < batches.length; batch++) {
console.log(`Batch ${batch + 1} - Attempting to modify whitelist to accounts: \n\n`, investorArray[batch], '\n');
let action = await currentTransferManager.methods.modifyWhitelistMulti(investorArray[batch], fromTimesArray[batch], toTimesArray[batch], expiryTimeArray[batch], canBuyFromSTOArray[batch]);
let receipt = await common.sendTransaction(action);
console.log(chalk.green('Whitelist transaction was successful.'));
console.log(`${receipt.gasUsed} gas used.Spent: ${web3.utils.fromWei((new web3.utils.BN(receipt.gasUsed)).mul(new web3.utils.BN(defaultGasPrice)))} ETH`);
}
}
>>>>>>>
function showWhitelistTable(investorsArray, fromTimeArray, toTimeArray, expiryTimeArray, canBuyFromSTOArray) {
let dataTable = [['Investor', 'From time', 'To time', 'KYC expiry date', 'Restricted']];
for (let i = 0; i < investorsArray.length; i++) {
dataTable.push([
investorsArray[i],
moment.unix(fromTimeArray[i]).format('MM/DD/YYYY HH:mm'),
moment.unix(toTimeArray[i]).format('MM/DD/YYYY HH:mm'),
moment.unix(expiryTimeArray[i]).format('MM/DD/YYYY HH:mm'),
canBuyFromSTOArray[i] ? 'YES' : 'NO'
]);
}
console.log();
console.log(table(dataTable));
}
async function modifyWhitelistInBatch() {
let csvFilePath = readlineSync.question(`Enter the path for csv data file (${WHITELIST_DATA_CSV}): `, {
defaultInput: WHITELIST_DATA_CSV
});
let batchSize = readlineSync.question(`Enter the max number of records per transaction or batch size (${gbl.constants.DEFAULT_BATCH_SIZE}): `, {
limit: function (input) {
return parseInt(input) > 0;
},
limitMessage: 'Must be greater than 0',
defaultInput: gbl.constants.DEFAULT_BATCH_SIZE
});
let parsedData = csvParse(csvFilePath);
let validData = parsedData.filter(row =>
web3.utils.isAddress(row[0]) &&
moment.unix(row[1]).isValid() &&
moment.unix(row[2]).isValid() &&
moment.unix(row[3]).isValid() &&
typeof row[4] === 'boolean'
);
let invalidRows = parsedData.filter(row => !validData.includes(row));
if (invalidRows.length > 0) {
console.log(chalk.red(`The following lines from csv file are not valid: ${invalidRows.map(r => parsedData.indexOf(r) + 1).join(',')} `));
}
let batches = common.splitIntoBatches(validData, batchSize);
let [investorArray, fromTimesArray, toTimesArray, expiryTimeArray, canBuyFromSTOArray] = common.transposeBatches(batches);
for (let batch = 0; batch < batches.length; batch++) {
console.log(`Batch ${batch + 1} - Attempting to modify whitelist to accounts: \n\n`, investorArray[batch], '\n');
let action = await currentTransferManager.methods.modifyWhitelistMulti(investorArray[batch], fromTimesArray[batch], toTimesArray[batch], expiryTimeArray[batch], canBuyFromSTOArray[batch]);
let receipt = await common.sendTransaction(action);
console.log(chalk.green('Whitelist transaction was successful.'));
console.log(`${receipt.gasUsed} gas used.Spent: ${web3.utils.fromWei((new web3.utils.BN(receipt.gasUsed)).mul(new web3.utils.BN(defaultGasPrice)))} ETH`);
}
}
<<<<<<<
console.log(`Allowance: ${web3.utils.fromWei(manualApproval.allowance)}`);
console.log(`Expiry time: ${moment.unix(manualApproval.expiryTime).format('MMMM Do YYYY, HH:mm:ss')}`);
=======
console.log(`Allowance: ${web3.utils.fromWei(manualApproval.allowance)} `);
console.log(`Expiry time: ${moment.unix(manualApproval.expiryTime).format('MMMM Do YYYY, HH:mm:ss')}; `)
>>>>>>>
console.log(`Allowance: ${web3.utils.fromWei(manualApproval.allowance)}`);
console.log(`Expiry time: ${moment.unix(manualApproval.expiryTime).format('MMMM Do YYYY, HH:mm:ss')}`); |
<<<<<<<
const STO_KEY = 3;
=======
const MODULES_TYPES = {
PERMISSION: 1,
TRANSFER: 2,
STO: 3,
DIVIDENDS: 4
}
const REG_FEE_KEY = 'tickerRegFee';
const LAUNCH_FEE_KEY = 'stLaunchFee';
>>>>>>>
const MODULES_TYPES = {
PERMISSION: 1,
TRANSFER: 2,
STO: 3,
DIVIDENDS: 4
}
<<<<<<<
let regFee = web3.utils.fromWei(await securityTokenRegistry.methods.getTickerRegistrationFee().call());
=======
let isDeployed;
let regFee = web3.utils.fromWei(await securityTokenRegistry.methods.getUintValues(web3.utils.soliditySha3(REG_FEE_KEY)).call());
>>>>>>>
let regFee = web3.utils.fromWei(await securityTokenRegistry.methods.getTickerRegistrationFee().call());
let isDeployed; |
<<<<<<<
assert.equal(await I_GeneralPermissionManagerFactory.getType.call(),1);
assert.equal(await I_GeneralPermissionManagerFactory.getVersion.call(), "1.0.0");
=======
assert.equal((await I_GeneralPermissionManagerFactory.getTypes.call())[0],1);
>>>>>>>
assert.equal((await I_GeneralPermissionManagerFactory.getTypes.call())[0],1);
assert.equal(await I_GeneralPermissionManagerFactory.getVersion.call(), "1.0.0"); |
<<<<<<<
PolyToken = '0xd8568c6535f1bbd82f84d981bf8ea5ca2336052e' // PolyToken Kovan Faucet Address
PolyOracle = '0x9c2c839c71ae659b82f96071f518c6e96c3af071' // Poly Oracle Kovan Address
ETHOracle = '0x2a64846750e0059bc4d87648a00faebdf82982a9' // ETH Mocked Oracle Address
=======
PolyToken = '0xb06d72a24df50d4e2cac133b320c5e7de3ef94cb' // PolyToken Kovan Faucet Address
>>>>>>>
PolyToken = '0xb06d72a24df50d4e2cac133b320c5e7de3ef94cb' // PolyToken Kovan Faucet Address
PolyOracle = '0x9c2c839c71ae659b82f96071f518c6e96c3af071' // Poly Oracle Kovan Address
ETHOracle = '0x2a64846750e0059bc4d87648a00faebdf82982a9' // ETH Mocked Oracle Address |
<<<<<<<
await catchRevert(I_SecurityToken.forceBurn(account_temp, currentBalance + web3.utils.toWei("500", "ether"), "", { from: account_controller }));
=======
try {
let tx = await I_SecurityToken.forceBurn(account_temp, currentBalance + web3.utils.toWei("500", "ether"), "", "", { from: account_controller });
} catch(error) {
console.log(` tx revert -> value is greater than its current balance`.grey);
errorThrown = true;
ensureException(error);
}
assert.ok(errorThrown, message);
>>>>>>>
await catchRevert(I_SecurityToken.forceBurn(account_temp, currentBalance + web3.utils.toWei("500", "ether"), "", "", { from: account_controller }));
<<<<<<<
await catchRevert(I_SecurityToken.forceBurn(account_temp, currentBalance, "", { from: token_owner }));
=======
try {
let tx = await I_SecurityToken.forceBurn(account_temp, currentBalance, "", "", { from: token_owner });
} catch(error) {
console.log(` tx revert -> not owner`.grey);
errorThrown = true;
ensureException(error);
}
assert.ok(errorThrown, message);
>>>>>>>
await catchRevert(I_SecurityToken.forceBurn(account_temp, currentBalance, "", "", { from: token_owner }));
<<<<<<<
await catchRevert(I_SecurityToken.forceTransfer(account_investor1, account_investor2, web3.utils.toWei("10", "ether"), "reason", {from: account_investor1}));
=======
let errorThrown1 = false;
try {
await I_SecurityToken.forceTransfer(account_investor1, account_investor2, web3.utils.toWei("10", "ether"), "", "reason", {from: account_investor1});
} catch (error) {
console.log(` tx revert -> not approved controller`.grey);
errorThrown1 = true;
ensureException(error);
}
assert.ok(errorThrown1, message);
>>>>>>>
await catchRevert(I_SecurityToken.forceTransfer(account_investor1, account_investor2, web3.utils.toWei("10", "ether"), "", "reason", {from: account_investor1}));
<<<<<<<
await catchRevert(I_SecurityToken.forceTransfer(account_investor2, account_investor1, web3.utils.toWei("10", "ether"), "reason", {from: account_controller}));
=======
let errorThrown = false;
try {
await I_SecurityToken.forceTransfer(account_investor2, account_investor1, web3.utils.toWei("10", "ether"), "", "reason", {from: account_controller});
} catch (error) {
console.log(` tx revert -> insufficient balance`.grey);
errorThrown = true;
ensureException(error);
}
assert.ok(errorThrown, message);
>>>>>>>
await catchRevert(I_SecurityToken.forceTransfer(account_investor2, account_investor1, web3.utils.toWei("10", "ether"), "", "reason", {from: account_controller}));
<<<<<<<
await catchRevert(I_SecurityToken.forceTransfer(account_investor1, address_zero, web3.utils.toWei("10", "ether"), "reason", {from: account_controller}));
=======
let errorThrown = false;
try {
await I_SecurityToken.forceTransfer(account_investor1, address_zero, web3.utils.toWei("10", "ether"), "", "reason", {from: account_controller});
} catch (error) {
console.log(` tx revert -> recipient is zero address`.grey);
errorThrown = true;
ensureException(error);
}
assert.ok(errorThrown, message);
>>>>>>>
await catchRevert(I_SecurityToken.forceTransfer(account_investor1, address_zero, web3.utils.toWei("10", "ether"), "", "reason", {from: account_controller}));
<<<<<<<
await catchRevert(I_SecurityToken.forceTransfer(account_investor1, account_investor2, web3.utils.toWei("10", "ether"), "reason", {from: account_controller}));
=======
let errorThrown = false;
try {
await I_SecurityToken.forceTransfer(account_investor1, account_investor2, web3.utils.toWei("10", "ether"), "", "reason", {from: account_controller});
} catch (error) {
console.log(` tx revert -> recipient is zero address`.grey);
errorThrown = true;
ensureException(error);
}
assert.ok(errorThrown, message);
>>>>>>>
await catchRevert(I_SecurityToken.forceTransfer(account_investor1, account_investor2, web3.utils.toWei("10", "ether"), "", "reason", {from: account_controller})); |
<<<<<<<
const holderPercentage = 70 * 10 ** 16; // Maximum number of token holders
let bytesSTO = web3.eth.abi.encodeFunctionCall(
{
name: "configure",
type: "function",
inputs: [
{
type: "uint256",
name: "_maxHolderPercentage"
}
]
},
[holderPercentage]
);
before(async () => {
=======
const holderPercentage = 70 * 10**16; // Maximum number of token holders
let bytesSTO = web3.eth.abi.encodeFunctionCall({
name: 'configure',
type: 'function',
inputs: [{
type: 'uint256',
name: '_maxHolderPercentage'
},{
type: 'bool',
name: '_allowPrimaryIssuance'
}
]
}, [holderPercentage, false]);
const STRProxyParameters = ['address', 'address', 'uint256', 'uint256', 'address', 'address'];
const MRProxyParameters = ['address', 'address'];
before(async() => {
>>>>>>>
const holderPercentage = 70 * 10**16; // Maximum number of token holders
let bytesSTO = web3.eth.abi.encodeFunctionCall({
name: 'configure',
type: 'function',
inputs: [{
type: 'uint256',
name: '_maxHolderPercentage'
},{
type: 'bool',
name: '_allowPrimaryIssuance'
}
]
}, [holderPercentage, false]);
const STRProxyParameters = ['address', 'address', 'uint256', 'uint256', 'address', 'address'];
const MRProxyParameters = ['address', 'address'];
before(async() => {
<<<<<<<
it("Should successfully attach the PercentageTransferManagerr factory with the security token", async () => {
=======
it("Should successfully attach the PercentageTransferManager factory with the security token - failed payment", async () => {
let errorThrown = false;
>>>>>>>
it("Should successfully attach the PercentageTransferManager factory with the security token - failed payment", async () => {
<<<<<<<
it("Should not be able to transfer between existing token holders over limit", async () => {
await catchRevert(I_SecurityToken.transfer(account_investor3, web3.utils.toWei("2", "ether"), { from: account_investor1 }));
=======
it("Should unpause the tranfers at transferManager level", async() => {
await I_PercentageTransferManager.unpause({from: token_owner});
})
it("Should not be able to mint token amount over limit", async() => {
let errorThrown = false;
try {
await I_SecurityToken.mint(account_investor3, web3.utils.toWei('100', 'ether'), { from: token_owner });
} catch(error) {
console.log(` tx revert -> Too high minting`.grey);
ensureException(error);
errorThrown = true;
}
assert.ok(errorThrown, message);
});
it("Allow unlimited primary issuance and remint", async() => {
let snapId = await takeSnapshot();
await I_PercentageTransferManager.setAllowPrimaryIssuance(true, { from: token_owner });
await I_SecurityToken.mint(account_investor3, web3.utils.toWei('100', 'ether'), { from: token_owner });
await revertToSnapshot(snapId);
});
it("Should not be able to transfer between existing token holders over limit", async() => {
let errorThrown = false;
try {
await I_SecurityToken.transfer(account_investor3, web3.utils.toWei('2', 'ether'), { from: account_investor1 });
} catch(error) {
console.log(` tx revert -> Too many holders`.grey);
ensureException(error);
errorThrown = true;
}
assert.ok(errorThrown, message);
>>>>>>>
it("Should not be able to transfer between existing token holders over limit", async () => {
await catchRevert(I_SecurityToken.transfer(account_investor3, web3.utils.toWei("2", "ether"), { from: account_investor1 }));
});
it("Should unpause the tranfers at transferManager level", async() => {
await I_PercentageTransferManager.unpause({from: token_owner});
})
it("Should not be able to mint token amount over limit", async() => {
let errorThrown = false;
try {
await I_SecurityToken.mint(account_investor3, web3.utils.toWei('100', 'ether'), { from: token_owner });
} catch(error) {
console.log(` tx revert -> Too high minting`.grey);
ensureException(error);
errorThrown = true;
}
assert.ok(errorThrown, message);
});
it("Allow unlimited primary issuance and remint", async() => {
let snapId = await takeSnapshot();
await I_PercentageTransferManager.setAllowPrimaryIssuance(true, { from: token_owner });
await I_SecurityToken.mint(account_investor3, web3.utils.toWei('100', 'ether'), { from: token_owner });
await revertToSnapshot(snapId);
});
it("Should not be able to transfer between existing token holders over limit", async() => {
let errorThrown = false;
try {
await I_SecurityToken.transfer(account_investor3, web3.utils.toWei('2', 'ether'), { from: account_investor1 });
} catch(error) {
console.log(` tx revert -> Too many holders`.grey);
ensureException(error);
errorThrown = true;
}
assert.ok(errorThrown, message); |
<<<<<<<
animationEnabled: PropTypes.bool,
=======
activeOpacity: PropTypes.number,
>>>>>>>
activeOpacity: PropTypes.number,
animationEnabled: PropTypes.bool,
<<<<<<<
animationEnabled: false,
=======
activeOpacity: 0.2,
>>>>>>>
activeOpacity: 0.2,
animationEnabled: false,
<<<<<<<
animationEnabled,
=======
activeOpacity,
>>>>>>>
activeOpacity,
animationEnabled,
<<<<<<<
<AnimatableView
=======
<StarButton
activeOpacity={activeOpacity}
buttonStyle={buttonStyle}
disabled={disabled}
halfStarEnabled={halfStarEnabled}
iconSet={iconSet}
>>>>>>>
<AnimatableView |
<<<<<<<
.option('dc', {
describe: 'DHT concurrency',
alias: 'dht_concurrency',
type: 'number'
})
.option('apw', {
describe: 'WebSocket api port',
alias: 'api_port',
type: 'number',
demand: true
})
=======
>>>>>>>
.option('dc', {
describe: 'DHT concurrency',
alias: 'dht_concurrency',
type: 'number'
}) |
<<<<<<<
=======
<Button bsSize='xsmall' bsStyle='link' className='remove' onClick={this.remove}>
×
</Button>
>>>>>>> |
<<<<<<<
// Power monitor
const powerMonitor = new PowerMonitor(mainWindow);
powerMonitor.enable();
=======
// Tray manager
const trayIcon = os.platform() === 'win32' ? museeksIcons['tray-ico'] : museeksIcons['tray'];
const trayManager = new TrayManager(mainWindow, trayIcon);
trayManager.bindEvents();
>>>>>>>
// Power monitor
const powerMonitor = new PowerMonitor(mainWindow);
powerMonitor.enable();
// Tray manager
const trayIcon = os.platform() === 'win32' ? museeksIcons['tray-ico'] : museeksIcons['tray'];
const trayManager = new TrayManager(mainWindow, trayIcon);
trayManager.bindEvents(); |
<<<<<<<
TestCase.assertType(Realm.List, 'function');
=======
>>>>>>> |
<<<<<<<
TestCase.assertTrue(e.message === 'Invalid admin token or server.');
=======
TestCase.assertTrue(e === 'Error: Invalid adminToken or server.');
>>>>>>>
TestCase.assertTrue(e.message === 'Invalid adminToken or server.');
<<<<<<<
TestCase.assertTrue(e.message === 'Invalid admin token or server.');
=======
TestCase.assertTrue(e === 'Error: Invalid adminToken or server.');
>>>>>>>
TestCase.assertTrue(e.message === 'Invalid adminToken or server.'); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
realm.close();
>>>>>>>
realm.close();
<<<<<<<
// FIXME: reenable this test!
/* testCopyBundledRealmFiles: function() {
let config = {path: 'realm-bundle.realm', schema: [schemas.DateObject]};
if (Realm.exists(config)) {
Realm.deleteFile(config);
}
=======
testCopyBundledRealmFiles: function() {
let config = {path: 'realm-bundle.realm', schema: [schemas.DateObject]};
if (Realm.exists(config)) {
Realm.deleteFile(config);
}
>>>>>>>
// FIXME: reenable this test!
/* testCopyBundledRealmFiles: function() {
let config = {path: 'realm-bundle.realm', schema: [schemas.DateObject]};
if (Realm.exists(config)) {
Realm.deleteFile(config);
}
<<<<<<<
// realm1 and realm2 are the same Realm instance
realm2.objects('StringOnlyObject');
=======
// realm1 and realm2 are wrapping the same Realm instance
realm2.objects('StringOnlyObject');
>>>>>>>
// realm1 and realm2 are wrapping the same Realm instance
realm2.objects('StringOnlyObject');
<<<<<<<
=======
testSchemaUpdatesPartialRealm: function() {
if (!global.enableSyncTests) {
return;
}
const realmId = Utils.uuid();
let realm2 = null, called = false;
const config = {
schema: [schemas.TestObject],
sync: {
url: `realm://127.0.0.1:9080/${realmId}`,
fullSynchronization: false,
},
};
// We need an admin user to create the reference Realm
return Realm.Sync.User.login('http://127.0.0.1:9080', Realm.Sync.Credentials.usernamePassword("realm-admin", ""))
.then(user1 => {
config.sync.user = user1;
return Realm.open(config);
}).then(realm => {
TestCase.assertEqual(realm.schema.length, 7); // 5 permissions, 1 results set, 1 test object
return closeAfterUpload(realm);
})
.then(() => {
return Realm.Sync.User.login('http://127.0.0.1:9080', Realm.Sync.Credentials.anonymous());
}).then((user2) => {
const dynamicConfig = {
sync: { user: user2, url: `realm://127.0.0.1:9080/${realmId}`, fullSynchronization: false },
};
return Realm.open(dynamicConfig);
}).then(r => {
realm2 = r;
TestCase.assertEqual(realm2.schema.length, 7); // 5 permissions, 1 results set, 1 test object
realm2.addListener('schema', (realm, event, schema) => {
TestCase.assertEqual(realm2.schema.length, 8); // 5 permissions, 1 results set, 1 test object, 1 foo object
called = true;
});
}).then(() => {
config.schema.push({
name: 'Foo',
properties: {
doubleCol: 'double',
}
});
return Realm.open(config);
}).then((realm3) => {
return closeAfterUpload(realm3);
}).then(() => {
return new Promise((resolve, reject) => {
setTimeout(() => {
realm2.close();
if (called) {
resolve();
} else {
reject('listener never called');
}
}, 1000);
});
});
},
>>>>>>> |
<<<<<<<
var Realm = require('realm');
var TestCase = require('./asserts');
var schemas = require('./schemas');
module.exports = {
testLinkTypesPropertySetters: function() {
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
var obj = null;
realm.write(function() {
obj = realm.create('LinkTypesObject', [[1], undefined, [[3]]]);
});
TestCase.assertEqual(realm.objects('TestObject').length, 2);
// set/reuse object property
realm.write(function() {
obj.objectCol1 = obj.objectCol;
});
TestCase.assertEqual(obj.objectCol1.doubleCol, 1);
//TestCase.assertEqual(obj.objectCol, obj.objectCol1);
TestCase.assertEqual(realm.objects('TestObject').length, 2);
realm.write(function() {
obj.objectCol = undefined;
obj.objectCol1 = null;
});
TestCase.assertEqual(obj.objectCol, null);
TestCase.assertEqual(obj.objectCol1, null);
// set object as JSON
realm.write(function() {
obj.objectCol = { doubleCol: 3 };
});
TestCase.assertEqual(obj.objectCol.doubleCol, 3);
TestCase.assertEqual(realm.objects('TestObject').length, 3);
},
=======
var ArrayTests = {
>>>>>>>
var Realm = require('realm');
var TestCase = require('./asserts');
var schemas = require('./schemas');
module.exports = {
<<<<<<<
testArraySubscript: function() {
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
realm.write(function() { realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]); });
=======
testArraySubscriptGetters: function() {
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
var array;
realm.write(function() {
var obj = realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]);
array = obj.arrayCol;
});
>>>>>>>
testArraySubscriptGetters: function() {
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
var array;
realm.write(function() {
var obj = realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]);
array = obj.arrayCol;
});
<<<<<<<
testArrayInvalidProperty: function() {
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
realm.write(function() { realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]); });
=======
testArraySubscriptSetters: function() {
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
var array;
realm.write(function() {
var obj = realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]);
array = obj.arrayCol;
array[0] = [5];
array[1] = [6];
TestCase.assertEqual(array[0].doubleCol, 5);
TestCase.assertEqual(array[1].doubleCol, 6);
TestCase.assertThrows(function() {
array[2] = [1];
}, 'cannot set list item beyond its bounds');
TestCase.assertThrows(function() {
array[-1] = [1];
}, 'cannot set list item with negative index');
});
TestCase.assertThrows(function() {
array[0] = [3];
}, 'cannot set list item outside write transaction');
},
testArrayInvalidProperty: function() {
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
var array;
realm.write(function() {
var obj = realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]);
array = obj.arrayCol;
});
>>>>>>>
testArraySubscriptSetters: function() {
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
var array;
realm.write(function() {
var obj = realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]);
array = obj.arrayCol;
array[0] = [5];
array[1] = [6];
TestCase.assertEqual(array[0].doubleCol, 5);
TestCase.assertEqual(array[1].doubleCol, 6);
TestCase.assertThrows(function() {
array[2] = [1];
}, 'cannot set list item beyond its bounds');
TestCase.assertThrows(function() {
array[-1] = [1];
}, 'cannot set list item with negative index');
});
TestCase.assertThrows(function() {
array[0] = [3];
}, 'cannot set list item outside write transaction');
},
testArrayInvalidProperty: function() {
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
var array;
realm.write(function() {
var obj = realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]);
array = obj.arrayCol;
});
<<<<<<<
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
realm.write(function() { realm.create('LinkTypesObject', [[1], [2], []]); });
=======
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
var obj;
realm.write(function() {
obj = realm.create('LinkTypesObject', [[1], [2], []]);
});
>>>>>>>
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
var obj;
realm.write(function() {
obj = realm.create('LinkTypesObject', [[1], [2], []]);
});
<<<<<<<
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
=======
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
var array;
>>>>>>>
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
var array; |
<<<<<<<
realmConstructor._Decimal128 = require('bson').Decimal128;
realmConstructor._ObjectId = require('bson').ObjectId;
const { DefaultNetworkTransport } = require('realm-network-transport');
realmConstructor._networkTransport = new DefaultNetworkTransport();
=======
Object.defineProperty(realmConstructor.Object.prototype, "toJSON", {
value: function () {
const result = {}
Object.keys(this).forEach(p => result[p] = this[p]);
Object.keys(Object.getPrototypeOf(this)).forEach(p => result[p] = this[p]);
return result;
},
writable: true,
configurable: true,
enumerable: false
});
Object.defineProperty(realmConstructor.Object.prototype, "keys", {
value: function () {
return Object.keys(this).concat(Object.keys(Object.getPrototypeOf(this)));
},
writable: true,
configurable: true,
enumerable: false
});
Object.defineProperty(realmConstructor.Object.prototype, "entries", {
value: function () {
let result = {};
for (const key in this) {
result[key] = this[key];
}
return Object.entries(result);
},
writable: true,
configurable: true,
enumerable: false
});
>>>>>>>
realmConstructor._Decimal128 = require('bson').Decimal128;
realmConstructor._ObjectId = require('bson').ObjectId;
const { DefaultNetworkTransport } = require('realm-network-transport');
realmConstructor._networkTransport = new DefaultNetworkTransport();
Object.defineProperty(realmConstructor.Object.prototype, "toJSON", {
value: function () {
const result = {}
Object.keys(this).forEach(p => result[p] = this[p]);
Object.keys(Object.getPrototypeOf(this)).forEach(p => result[p] = this[p]);
return result;
},
writable: true,
configurable: true,
enumerable: false
});
Object.defineProperty(realmConstructor.Object.prototype, "keys", {
value: function () {
return Object.keys(this).concat(Object.keys(Object.getPrototypeOf(this)));
},
writable: true,
configurable: true,
enumerable: false
});
Object.defineProperty(realmConstructor.Object.prototype, "entries", {
value: function () {
let result = {};
for (const key in this) {
result[key] = this[key];
}
return Object.entries(result);
},
writable: true,
configurable: true,
enumerable: false
});
<<<<<<<
=======
// Define the permission schemas as constructors so that they can be
// passed into directly to functions which want object type names
const Permission = function() {};
Object.setPrototypeOf(Permission.prototype, realmConstructor.Object.prototype);
Object.setPrototypeOf(Permission, realmConstructor.Object);
Permission.schema = Object.freeze({
name: '__Permission',
properties: {
role: '__Role',
canRead: {type: 'bool', default: false},
canUpdate: {type: 'bool', default: false},
canDelete: {type: 'bool', default: false},
canSetPermissions: {type: 'bool', default: false},
canQuery: {type: 'bool', default: false},
canCreate: {type: 'bool', default: false},
canModifySchema: {type: 'bool', default: false},
}
});
const User = function() {};
Object.setPrototypeOf(User.prototype, realmConstructor.Object.prototype);
Object.setPrototypeOf(User, realmConstructor.Object);
User.schema = Object.freeze({
name: '__User',
primaryKey: 'id',
properties: {
id: 'string',
role: '__Role'
}
});
const Role = function() {};
Object.setPrototypeOf(Role.prototype, realmConstructor.Object.prototype);
Object.setPrototypeOf(Role, realmConstructor.Object);
Role.schema = Object.freeze({
name: '__Role',
primaryKey: 'name',
properties: {
name: 'string',
members: '__User[]'
}
});
const Class = function() {};
Object.setPrototypeOf(Class.prototype, realmConstructor.Object.prototype);
Object.setPrototypeOf(Class, realmConstructor.Object);
Class.schema = Object.freeze({
name: '__Class',
primaryKey: 'name',
properties: {
name: 'string',
permissions: '__Permission[]'
}
});
Class.prototype.findOrCreate = function(roleName) {
return findOrCreatePermissionForRole(this, this.permissions, roleName);
};
const Realm = function() {};
Object.setPrototypeOf(Realm.prototype, realmConstructor.Object.prototype);
Object.setPrototypeOf(Realm, realmConstructor.Object);
Realm.schema = Object.freeze({
name: '__Realm',
primaryKey: 'id',
properties: {
id: 'int',
permissions: '__Permission[]'
}
});
Realm.prototype.findOrCreate = function(roleName) {
return findOrCreatePermissionForRole(this, this.permissions, roleName);
};
const permissionsSchema = {
'Class': Class,
'Permission': Permission,
'Realm': Realm,
'Role': Role,
'User': User,
};
if (!realmConstructor.Permissions) {
Object.defineProperty(realmConstructor, 'Permissions', {
value: permissionsSchema,
configurable: false
});
}
const ResultSets = function() {};
Object.setPrototypeOf(ResultSets.prototype, realmConstructor.Object.prototype);
Object.setPrototypeOf(ResultSets, realmConstructor.Object);
ResultSets.schema = Object.freeze({
name: '__ResultSets',
properties: {
_name: { type: 'string', indexed: true, mapTo: 'name' },
_query: {type: 'string', mapTo: 'query'},
_matchesProperty: {type: 'string', mapTo: 'matches_property'},
_queryParseCounter: {type: 'int', mapTo: 'query_parse_counter'},
_state: {type: 'int', mapTo: 'status'},
_errorMessage: { type: 'string', mapTo: 'error_message'},
_createdAt: { type: 'date', mapTo: 'created_at'},
_updatedAt: { type: 'date', mapTo: 'updated_at'},
_expiresAt: { type: 'date', optional: true, mapTo: 'expires_at'},
_timeToLive: { type: 'int', optional: true, mapTo: 'time_to_live'},
}
});
ResultSets.prototype._subscriptionUpdated = function(sub) {
this._updatedAt = new Date();
this._expiresAt = new Date(sub._updatedAt.getTime() + sub._timeToLive);
};
Object.defineProperties(ResultSets.prototype, {
objectType: {
enumerable: true,
get: function() {
return this._matchesProperty.replace(subscriptionObjectNameRegex, '$2');
}
},
name: {
enumerable: true,
get: function() {
return this._name;
}
},
query: {
enumerable: true,
set: function(val) {
if (typeof val === 'string' || val instanceof String) {
this._query = val;
} else {
const queryDescription = val.description();
if (queryDescription === undefined) {
throw new Error("Updating a query must be done either using a String or a Results object.");
}
this._query = queryDescription;
}
this._errorMessage = '';
this._state = 0;
this._subscriptionUpdated(this);
},
get: function() {
return this._query;
}
},
state: {
enumerable: true,
get: function() {
return this._state;
}
},
error: {
enumerable: true,
get: function() {
return (this._errorMessage === '') ? undefined : this._errorMessage;
}
},
createdAt: {
enumerable: true,
get: function() {
return this._createdAt;
}
},
updatedAt: {
enumerable: true,
get: function() {
return this._updatedAt;
}
},
expiresAt: {
enumerable: true,
get: function() {
return this._expiresAt;
}
},
timeToLive: {
enumerable: true,
set: function(val) {
this._timeToLive = val;
this._subscriptionUpdated(this);
},
get: function() {
return this._timeToLive;
}
}
});
const subscriptionSchema = {
'ResultSets': ResultSets
};
if (!realmConstructor.Subscription) {
Object.defineProperty(realmConstructor, 'Subscription', {
value: subscriptionSchema,
configurable: false,
});
}
// Add instance methods to the Realm object that are only applied if Sync is
Object.defineProperties(realmConstructor.prototype, getOwnPropertyDescriptors({
permissions(arg) {
if (!this._isPartialRealm) {
throw new Error("Wrong Realm type. 'permissions()' is only available for Query-based Realms.");
}
// If no argument is provided, return the Realm-level permissions
if (arg === undefined) {
return this.objects('__Realm').filtered(`id = 0`)[0];
} else {
// Else try to find the corresponding Class-level permissions
let schemaName = this._schemaName(arg);
let classPermissions = this.objects('__Class').filtered(`name = '${schemaName}'`);
if (classPermissions.length === 0) {
throw Error(`Could not find Class-level permissions for '${schemaName}'`);
}
return classPermissions[0];
}
},
subscriptions(name) {
if (!this._isPartialRealm) {
throw new Error("Wrong Realm type. 'subscriptions()' is only available for Query-based Realms.");
}
let allSubscriptions = this.objects('__ResultSets');
if (name) {
if (typeof(name) !== 'string') {
throw new Error(`string expected - got ${typeof(name)}.`);
}
if (name.includes('*') || name.includes('?')) {
allSubscriptions = allSubscriptions.filtered(`name LIKE '${name}'`);
} else {
allSubscriptions = allSubscriptions.filtered(`name == '${name}'`);
}
}
return allSubscriptions;
},
unsubscribe(name) {
if (!this._isPartialRealm) {
throw new Error("Wrong Realm type. 'unsubscribe()' is only available for Query-based Realms.");
}
if (typeof(name) === 'string') {
if (name !== '') {
let named_subscriptions = this.objects('__ResultSets').filtered(`name == '${name}'`);
if (named_subscriptions.length === 0) {
return;
}
let doCommit = false;
if (!this.isInTransaction) {
this.beginTransaction();
doCommit = true;
}
this.delete(named_subscriptions);
if (doCommit) {
this.commitTransaction();
}
} else {
throw new Error('Non-empty string expected.');
}
} else {
throw new Error(`string expected - got ${typeof(name)}.`);
}
}
}));
>>>>>>> |
<<<<<<<
if (!this.collection.length) {
return Backbone.trigger('blog:activeItem', null);
}
var id = this.collection.at(0).id;
=======
var id = this.collection.at(0) ? this.collection.at(0).id : false;
>>>>>>>
if (!this.collection.length) {
return Backbone.trigger('blog:activeItem', null);
}
var id = this.collection.at(0) ? this.collection.at(0).id : false; |
<<<<<<<
if(itemExists(LUISJSONBlob.entities, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.closedLists, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.model_features, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.prebuiltEntities, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.regex_entities, entity.name, entity.roles)) return false;
=======
if (itemExists(LUISJSONBlob.entities, entity.name, entity.roles)) return false;
if (itemExists(LUISJSONBlob.closedLists, entity.name, entity.roles)) return false;
if (itemExists(LUISJSONBlob.model_features, entity.name, entity.roles)) return false;
if (itemExists(LUISJSONBlob.prebuiltEntities, entity.name, entity.roles)) return false;
>>>>>>>
if(itemExists(LUISJSONBlob.entities, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.closedLists, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.model_features, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.prebuiltEntities, entity.name, entity.roles)) return false;
if(itemExists(LUISJSONBlob.regex_entities, entity.name, entity.roles)) return false;
if (itemExists(LUISJSONBlob.prebuiltEntities, entity.name, entity.roles)) return false;
<<<<<<<
if(LUISJSONBlob.regex_entities.length > 0) {
LUISJSONBlob.regex_entities.forEach(function(entity) {
entityFound = helpers.filterMatch(entitiesList, 'name', entity.name);
if(entityFound.length === 0) {
entitiesList.push(new helperClass.validateLUISBlobEntity(entity.name, [`regEx:/${entity.regexPattern}/`]));
} else {
if (entityFound[0].regexPattern !== undefined) {
if (entityFound[0].regexPattern !== entity.regexPattern)
entityFound[0].type.push(`regEx:/${entity.regexPattern}/`);
} else {
entityFound[0].type.push(`regEx:/${entity.regexPattern}/`);
}
}
});
}
=======
>>>>>>>
if(LUISJSONBlob.regex_entities.length > 0) {
LUISJSONBlob.regex_entities.forEach(function(entity) {
entityFound = helpers.filterMatch(entitiesList, 'name', entity.name);
if(entityFound.length === 0) {
entitiesList.push(new helperClass.validateLUISBlobEntity(entity.name, [`regEx:/${entity.regexPattern}/`]));
} else {
if (entityFound[0].regexPattern !== undefined) {
if (entityFound[0].regexPattern !== entity.regexPattern)
entityFound[0].type.push(`regEx:/${entity.regexPattern}/`);
} else {
entityFound[0].type.push(`regEx:/${entity.regexPattern}/`);
}
}
});
}
<<<<<<<
} else if (entityType.startsWith('/')) {
if (entityType.endsWith('/')) {
// handle regex entity
let regex = entityType.slice(1).slice(0, entityType.length - 2);
if (regex === '') throw(new exception(retCode.errorCode.INVALID_REGEX_ENTITY, `[ERROR]: RegEx entity: ${regExEntity.name} has empty regex pattern defined.`));
// add this as a regex entity if it does not exist
let regExEntity = (parsedContent.LUISJsonStructure.regex_entities || []).find(item => item.name == entityName);
if (regExEntity === undefined) {
parsedContent.LUISJsonStructure.regex_entities.push(
new helperClass.regExEntity(entityName, regex, entityRoles)
)
} else {
// throw an error if the pattern is different for the same entity
if (regExEntity.regexPattern !== regex) {
throw(new exception(retCode.errorCode.INVALID_REGEX_ENTITY, `[ERROR]: RegEx entity: ${regExEntity.name} has multiple regex patterns defined. \n 1. /${regex}/\n 2. /${regExEntity.regexPattern}/`));
}
}
} else {
throw(new exception(retCode.errorCode.INVALID_REGEX_ENTITY, `[ERROR]: RegEx entity: ${regExEntity.name} is missing trailing '/'. Regex patterns need to be enclosed in forward slashes. e.g. /[0-9]/`));
}
} else if(entityType.endsWith('=')) {
=======
} else if (entityType.endsWith('=')) {
>>>>>>>
} else if (entityType.startsWith('/')) {
if (entityType.endsWith('/')) {
// handle regex entity
let regex = entityType.slice(1).slice(0, entityType.length - 2);
if (regex === '') throw(new exception(retCode.errorCode.INVALID_REGEX_ENTITY, `[ERROR]: RegEx entity: ${regExEntity.name} has empty regex pattern defined.`));
// add this as a regex entity if it does not exist
let regExEntity = (parsedContent.LUISJsonStructure.regex_entities || []).find(item => item.name == entityName);
if (regExEntity === undefined) {
parsedContent.LUISJsonStructure.regex_entities.push(
new helperClass.regExEntity(entityName, regex, entityRoles)
)
} else {
// throw an error if the pattern is different for the same entity
if (regExEntity.regexPattern !== regex) {
throw(new exception(retCode.errorCode.INVALID_REGEX_ENTITY, `[ERROR]: RegEx entity: ${regExEntity.name} has multiple regex patterns defined. \n 1. /${regex}/\n 2. /${regExEntity.regexPattern}/`));
}
}
} else {
throw(new exception(retCode.errorCode.INVALID_REGEX_ENTITY, `[ERROR]: RegEx entity: ${regExEntity.name} is missing trailing '/'. Regex patterns need to be enclosed in forward slashes. e.g. /[0-9]/`));
}
} else if(entityType.endsWith('=')) { |
<<<<<<<
var mouseX = 0, mouseY = 0, pmouseX = 0, pmouseY = 0;
var pressX = 0, pressY = 0;
var dragging = false;
var rotateTargetX = undefined;
function onDocumentMouseMove( event ) {
pmouseX = mouseX;
pmouseY = mouseY;
mouseX = event.clientX - window.innerWidth * 0.5;
mouseY = event.clientY - window.innerHeight * 0.5;
}
function onDocumentMouseDown( event ) {
if(event.target.className.indexOf('noMapDrag') !== -1) {
return;
}
dragging = true;
pressX = mouseX;
pressY = mouseY;
rotateTargetX = undefined;
rotateTargetX = undefined;
}
=======
function animate () {
renderer.clear();
renderer.render( scene, camera );
requestAnimationFrame(animate);
}
>>>>>>>
var mouseX = 0, mouseY = 0, pmouseX = 0, pmouseY = 0;
var pressX = 0, pressY = 0;
var dragging = false;
var rotateTargetX = undefined;
function onDocumentMouseMove( event ) {
pmouseX = mouseX;
pmouseY = mouseY;
mouseX = event.clientX - window.innerWidth * 0.5;
mouseY = event.clientY - window.innerHeight * 0.5;
}
function onDocumentMouseDown( event ) {
if(event.target.className.indexOf('noMapDrag') !== -1) {
return;
}
dragging = true;
pressX = mouseX;
pressY = mouseY;
rotateTargetX = undefined;
rotateTargetX = undefined;
}
function animate () {
renderer.clear();
renderer.render( scene, camera );
requestAnimationFrame(animate);
}
<<<<<<<
// function highlightCountry( countries ){
// var countryCodes = [];
// for( var i in countries ){
// var code = findCode(countries[i]);
// countryCodes.push(code);
// }
//
// var ctx = lookupCanvas.getContext('2d');
// ctx.clearRect(0,0,256,1);
//
// // color index 0 is the ocean, leave it something neutral
//
// // this fixes a bug where the fill for ocean was being applied during pick
// // all non-countries were being pointed to 10 - bolivia
// // the fact that it didn't select was because bolivia shows up as an invalid country due to country name mismatch
// // ...
// var pickMask = countries.length == 0 ? 0 : 1;
// var oceanFill = 10 * pickMask;
// ctx.fillStyle = 'rgb(' + oceanFill + ',' + oceanFill + ',' + oceanFill +')';
// ctx.fillRect( 0, 0, 1, 1 );
//
// // for( var i = 0; i<255; i++ ){
// // var fillCSS = 'rgb(' + i + ',' + 0 + ',' + i + ')';
// // ctx.fillStyle = fillCSS;
// // ctx.fillRect( i, 0, 1, 1 );
// // }
//
// var selectedCountryCode = selectedCountry.countryCode;
//
// for( var i in countryCodes ){
// var countryCode = countryCodes[i];
// var colorIndex = countryColorMap[ countryCode ];
//
// var mapColor = countryData[countries[i]].mapColor;
// // var fillCSS = '#ff0000';
// var fillCSS = '#333333';
// if( countryCode === selectedCountryCode )
// fillCSS = '#eeeeee'
// // if( mapColor !== undefined ){
// // var k = map( mapColor, 0, 200000000, 0, 255 );
// // k = Math.floor( constrain( k, 0, 255 ) );
// // fillCSS = 'rgb(' + k + ',' + k + ',' + k + ')';
// // }
// ctx.fillStyle = fillCSS;
// ctx.fillRect( colorIndex, 0, 1, 1 );
// }
//
// lookupTexture.needsUpdate = true;
// }
//
// function findCode(countryName){
// countryName = countryName.toUpperCase();
// for( var i in countryLookup ){
// if( countryLookup[i] === countryName )
// return i;
// }
// return 'not found';
// }
function getPickColor(){
var affectedCountries = undefined;
if( visualizationMesh.children[0] !== undefined )
affectedCountries = visualizationMesh.children[0].affectedCountries;
highlightCountry([]);
rotating.remove(visualizationMesh);
mapUniforms['outlineLevel'].value = 0;
lookupTexture.needsUpdate = true;
renderer.autoClear = false;
renderer.autoClearColor = false;
renderer.autoClearDepth = false;
renderer.autoClearStencil = false;
renderer.preserve
renderer.clear();
renderer.render(scene,camera);
var gl = renderer.context;
gl.preserveDrawingBuffer = true;
var mx = ( mouseX + renderer.context.canvas.width/2 );//(mouseX + renderer.context.canvas.width/2) * 0.25;
var my = ( -mouseY + renderer.context.canvas.height/2 );//(-mouseY + renderer.context.canvas.height/2) * 0.25;
mx = Math.floor( mx );
my = Math.floor( my );
var buf = new Uint8Array( 4 );
// console.log(buf);
gl.readPixels( mx, my, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf );
// console.log(buf);
renderer.autoClear = true;
renderer.autoClearColor = true;
renderer.autoClearDepth = true;
renderer.autoClearStencil = true;
gl.preserveDrawingBuffer = false;
mapUniforms['outlineLevel'].value = 1;
rotating.add(visualizationMesh);
if( affectedCountries !== undefined ){
highlightCountry(affectedCountries);
}
return buf[0];
}
=======
>>>>>>>
// function highlightCountry( countries ){
// var countryCodes = [];
// for( var i in countries ){
// var code = findCode(countries[i]);
// countryCodes.push(code);
// }
//
// var ctx = lookupCanvas.getContext('2d');
// ctx.clearRect(0,0,256,1);
//
// // color index 0 is the ocean, leave it something neutral
//
// // this fixes a bug where the fill for ocean was being applied during pick
// // all non-countries were being pointed to 10 - bolivia
// // the fact that it didn't select was because bolivia shows up as an invalid country due to country name mismatch
// // ...
// var pickMask = countries.length == 0 ? 0 : 1;
// var oceanFill = 10 * pickMask;
// ctx.fillStyle = 'rgb(' + oceanFill + ',' + oceanFill + ',' + oceanFill +')';
// ctx.fillRect( 0, 0, 1, 1 );
//
// // for( var i = 0; i<255; i++ ){
// // var fillCSS = 'rgb(' + i + ',' + 0 + ',' + i + ')';
// // ctx.fillStyle = fillCSS;
// // ctx.fillRect( i, 0, 1, 1 );
// // }
//
// var selectedCountryCode = selectedCountry.countryCode;
//
// for( var i in countryCodes ){
// var countryCode = countryCodes[i];
// var colorIndex = countryColorMap[ countryCode ];
//
// var mapColor = countryData[countries[i]].mapColor;
// // var fillCSS = '#ff0000';
// var fillCSS = '#333333';
// if( countryCode === selectedCountryCode )
// fillCSS = '#eeeeee'
// // if( mapColor !== undefined ){
// // var k = map( mapColor, 0, 200000000, 0, 255 );
// // k = Math.floor( constrain( k, 0, 255 ) );
// // fillCSS = 'rgb(' + k + ',' + k + ',' + k + ')';
// // }
// ctx.fillStyle = fillCSS;
// ctx.fillRect( colorIndex, 0, 1, 1 );
// }
//
// lookupTexture.needsUpdate = true;
// }
//
// function findCode(countryName){
// countryName = countryName.toUpperCase();
// for( var i in countryLookup ){
// if( countryLookup[i] === countryName )
// return i;
// }
// return 'not found';
// }
function getPickColor(){
var affectedCountries = undefined;
if( visualizationMesh.children[0] !== undefined )
affectedCountries = visualizationMesh.children[0].affectedCountries;
highlightCountry([]);
rotating.remove(visualizationMesh);
mapUniforms['outlineLevel'].value = 0;
lookupTexture.needsUpdate = true;
renderer.autoClear = false;
renderer.autoClearColor = false;
renderer.autoClearDepth = false;
renderer.autoClearStencil = false;
renderer.preserve
renderer.clear();
renderer.render(scene,camera);
var gl = renderer.context;
gl.preserveDrawingBuffer = true;
var mx = ( mouseX + renderer.context.canvas.width/2 );//(mouseX + renderer.context.canvas.width/2) * 0.25;
var my = ( -mouseY + renderer.context.canvas.height/2 );//(-mouseY + renderer.context.canvas.height/2) * 0.25;
mx = Math.floor( mx );
my = Math.floor( my );
var buf = new Uint8Array( 4 );
// console.log(buf);
gl.readPixels( mx, my, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf );
// console.log(buf);
renderer.autoClear = true;
renderer.autoClearColor = true;
renderer.autoClearDepth = true;
renderer.autoClearStencil = true;
gl.preserveDrawingBuffer = false;
mapUniforms['outlineLevel'].value = 1;
rotating.add(visualizationMesh);
if( affectedCountries !== undefined ){
highlightCountry(affectedCountries);
}
return buf[0];
} |
<<<<<<<
import { ObjectUtils } from "./utils/BasicObjectUtils.js";
import { DataProcessor } from "./dataPreprocessors/DataProcessor.js";
import { LineGeometry } from "./objects/LineGeometry.js";
=======
import {ObjectUtils} from "./utils/BasicObjectUtils";
>>>>>>>
import { ObjectUtils } from "./utils/BasicObjectUtils.js";
import { LineGeometry } from "./objects/LineGeometry.js"; |
<<<<<<<
Vue.mixin({
methods: {
limitBy: arrayFilters.limitBy,
filterBy: arrayFilters.filterBy,
orderBy: arrayFilters.orderBy,
findFirst: arrayFilters.findFirst
}
})
=======
Vue.mixin({
methods: {
limitBy: arrayFilters.limitBy,
filterBy: arrayFilters.filterBy,
orderBy: arrayFilters.orderBy
}
})
}
>>>>>>>
Vue.mixin({
methods: {
limitBy: arrayFilters.limitBy,
filterBy: arrayFilters.filterBy,
orderBy: arrayFilters.orderBy,
findFirst: arrayFilters.findFirst
}
})
}
<<<<<<<
if (window.Vue) {
Vue.use(install)
} else if (typeof exports === "object") {
module.exports = install
} else if (typeof define === "function" && define.amd) {
define([], function(){ return install })
}
=======
export default Vue2Filters;
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(Vue2Filters);
}
>>>>>>>
export default Vue2Filters;
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(Vue2Filters);
} |
<<<<<<<
function renderTrendChart (chartDivId, model, urlName) { // eslint-disable-line no-unused-vars
var chartModel = JSON.parse(model);
var chartPlaceHolder = document.getElementById(chartDivId);
var currentSelection; // the tooltip formatter will change this value while hoovering
=======
function renderTrendChart(chartDivId, model, urlName) {
let chartModel = JSON.parse(model);
let chartPlaceHolder = document.getElementById(chartDivId);
let selectedBuild; // the tooltip formatter will change this value while hoovering
>>>>>>>
function renderTrendChart (chartDivId, model, urlName) { // eslint-disable-line no-unused-vars
let chartModel = JSON.parse(model);
let chartPlaceHolder = document.getElementById(chartDivId);
let selectedBuild; // the tooltip formatter will change this value while hoovering
<<<<<<<
currentSelection = null; // clear selection to avoid navigating to the selected build
});
=======
selectedBuild = 0; // clear selection to avoid navigating to the selected build
}
);
>>>>>>>
selectedBuild = 0; // clear selection to avoid navigating to the selected build
}); |
<<<<<<<
"explanation":"<strong>Learn more:</strong> In the long term, owning a home can be a great way to build wealth. However, it’s important to know that during the first several years of a mortgage, <a href=#>most of your payment goes to interest, not equity</a>. Also, remember that if home prices go down instead of up – as they did in 2008-2012 – you could lose all of your equity, including your down payment.",
"deletable": false
=======
"explanation":"Learn more: In the long term, owning a home can be a great way to build wealth. However, it’s important to know that during the first several years of a mortgage, <a href=#>most of your payment goes to interest, not equity</a>. Also, remember that if home prices go down instead of up – as they did in 2008-2012 – you could lose all of your equity, including your down payment.",
"deletable": true
>>>>>>>
"explanation":"<strong>Learn more:</strong> In the long term, owning a home can be a great way to build wealth. However, it’s important to know that during the first several years of a mortgage, <a href=#>most of your payment goes to interest, not equity</a>. Also, remember that if home prices go down instead of up – as they did in 2008-2012 – you could lose all of your equity, including your down payment.",
"deletable": true
<<<<<<<
"explanation":"<strong>Learn more:</strong> This is often true. However, it’s important to factor in the total costs of ownership – including insurance, taxes, maintenance, and discretionary improvements – as well as increases in other costs, such as commuting, that may result from buying. And depending on the real estate market, sometimes renting can actually be cheaper.",
"deletable": false
=======
"explanation":"Learn more: This is often true. However, it’s important to factor in the total costs of ownership – including insurance, taxes, maintenance, and discretionary improvements – as well as increases in other costs, such as commuting, that may result from buying. And depending on the real estate market, sometimes renting can actually be cheaper.",
"deletable": true
>>>>>>>
"explanation":"<strong>Learn more:</strong> This is often true. However, it’s important to factor in the total costs of ownership – including insurance, taxes, maintenance, and discretionary improvements – as well as increases in other costs, such as commuting, that may result from buying. And depending on the real estate market, sometimes renting can actually be cheaper.",
"deletable": true
<<<<<<<
"explanation":"<strong>Learn more:</strong> You can only claim the mortgage interest tax deduction if you itemize your deductions. For a typical $200,000 mortgage at 4.5%, you’d be able to deduct about $8900 for interest in the first year, and less in future years. The standard deduction for a married couple is $12,600 in tax year 2015, so unless that couple has at least $4700 in other deductions, having a mortgage won’t lower their taxes. For heads of household, the standard deduction is $9,250, and for singles it is $6,300.",
"deletable": false
=======
"explanation":"Learn more: You can only claim the mortgage interest tax deduction if you itemize your deductions. For a typical $200,000 mortgage at 4.5%, you’d be able to deduct about $8900 for interest in the first year, and less in future years. The standard deduction for a married couple is $12,600 in tax year 2015, so unless that couple has at least $4700 in other deductions, having a mortgage won’t lower their taxes. For heads of household, the standard deduction is $9,250, and for singles it is $6,300.",
"deletable": true
>>>>>>>
"explanation":"<strong>Learn more:</strong> You can only claim the mortgage interest tax deduction if you itemize your deductions. For a typical $200,000 mortgage at 4.5%, you’d be able to deduct about $8900 for interest in the first year, and less in future years. The standard deduction for a married couple is $12,600 in tax year 2015, so unless that couple has at least $4700 in other deductions, having a mortgage won’t lower their taxes. For heads of household, the standard deduction is $9,250, and for singles it is $6,300.",
"deletable": true |
<<<<<<<
var LoanActions = require('../actions/loan-actions');
var utils = require('../utils');
=======
>>>>>>>
var LoanActions = require('../actions/loan-actions');
<<<<<<<
=======
var Component = components[prop] || SelectInput;
var label = common.getPropLabel(prop);
>>>>>>> |
<<<<<<<
var common;
=======
var scenarioStore;
>>>>>>>
var common;
var scenarioStore; |
<<<<<<<
'./src/static/js/modules/check-rates.js',
//'./src/static/js/modules/loan-comparison.js',
//'./src/static/js/modules/prepare-worksheets/prepare-worksheets.js',
=======
'./src/static/js/modules/explore-rates.js',
'./src/static/js/modules/loan-comparison.js',
'./src/static/js/modules/prepare-worksheets/prepare-worksheets.js',
>>>>>>>
'./src/static/js/modules/explore-rates.js',
//'./src/static/js/modules/loan-comparison.js',
//'./src/static/js/modules/prepare-worksheets/prepare-worksheets.js',
<<<<<<<
'./src/static/js/modules/check-rates.js',
//'./src/static/js/modules/loan-comparison.js',
//'./src/static/js/modules/prepare-worksheets/prepare-worksheets.js',
=======
'./src/static/js/modules/explore-rates.js',
'./src/static/js/modules/loan-comparison.js',
'./src/static/js/modules/prepare-worksheets/prepare-worksheets.js',
>>>>>>>
'./src/static/js/modules/explore-rates.js',
//'./src/static/js/modules/loan-comparison.js',
//'./src/static/js/modules/prepare-worksheets/prepare-worksheets.js',
<<<<<<<
'dist/static/js/check-rates.js',
//'dist/static/js/loan-comparison.js',
//'dist/static/js/prepare-worksheets.js',
=======
'dist/static/js/explore-rates.js',
'dist/static/js/loan-comparison.js',
'dist/static/js/prepare-worksheets.js',
>>>>>>>
'dist/static/js/explore-rates.js',
//'dist/static/js/loan-comparison.js',
//'dist/static/js/prepare-worksheets.js',
<<<<<<<
'check-rates.js',
//'loan-comparison.js',
//'prepare-worksheets.js',
=======
'explore-rates.js',
'loan-comparison.js',
'prepare-worksheets.js',
>>>>>>>
'explore-rates.js',
//'loan-comparison.js',
//'prepare-worksheets.js',
<<<<<<<
'check-rates/**',
'closing-disclosure/**',
'loan-estimate/**',
'mortgage-closing/**',
'mortgage-estimate/**',
'process/**',
=======
'explore-rates/**',
>>>>>>>
'explore-rates/**',
'closing-disclosure/**',
'loan-estimate/**',
'mortgage-closing/**',
'mortgage-estimate/**',
'process/**', |
<<<<<<<
$('.comparisons').on( 'change keyup', '.recalc', debounce(updateComparisons, 500) );
=======
$('.comparisons').on( 'change', '.recalc', updateComparisons );
// toggle the inputs on mobile
$('.lc-toggle').click(function(e) {
e.preventDefault();
var $parent = $(this).parents('.lc-comparison'),
$inputs = $parent.find('.lc-inputs'),
$editLink = $('.lc-edit-link');
$inputs.toggleClass('input-open');
$editLink.toggle();
});
>>>>>>>
$('.comparisons').on( 'change keyup', '.recalc', debounce(updateComparisons, 500) );
// toggle the inputs on mobile
$('.lc-toggle').click(function(e) {
e.preventDefault();
var $parent = $(this).parents('.lc-comparison'),
$inputs = $parent.find('.lc-inputs'),
$editLink = $('.lc-edit-link');
$inputs.toggleClass('input-open');
$editLink.toggle();
}); |
<<<<<<<
'./src/static/js/modules/home.js',
'./src/static/js/modules/loan-options-subpage.js'
=======
'./src/static/js/modules/home.js',
'./src/static/js/modules/loan-options-subpage.js'
>>>>>>>
'./src/static/js/modules/home.js',
'./src/static/js/modules/loan-options-subpage.js'
<<<<<<<
=======
>>>>>>> |
<<<<<<<
"alternative":"Renters have more flexibility. It can be risky and expensive to buy if you end up needing to move again within a few years.",
=======
"altText":"",
>>>>>>>
"alternative":"Renters have more flexibility. It can be risky and expensive to buy if you end up needing to move again within a few years.",
"altText":"",
<<<<<<<
"alternative":"Owning a home is a long-term financial commitment. If you’re not confident that you’ll be able to continue earning at a similar level for the foreseeable future, it might make more sense to keep renting.",
=======
"altText":"",
>>>>>>>
"alternative":"Owning a home is a long-term financial commitment. If you’re not confident that you’ll be able to continue earning at a similar level for the foreseeable future, it might make more sense to keep renting.",
"altText":"",
<<<<<<<
"alternative":"In a lot of ways, it’s simpler and more financially predictable to rent.",
=======
"altText":"",
>>>>>>>
"alternative":"In a lot of ways, it’s simpler and more financially predictable to rent.",
"altText":"",
<<<<<<<
"alternative":"You could even find yourself owing more than your home is worth. In 2008-2012, house prices declined dramatically nationwide, with up to X% declines in some areas.",
=======
"altText":"",
>>>>>>>
"alternative":"You could even find yourself owing more than your home is worth. In 2008-2012, house prices declined dramatically nationwide, with up to X% declines in some areas.",
"altText":"",
<<<<<<<
"alternative":"When the furnace springs a leak or a tree falls on the roof, these aren’t repairs that you can wait to make. New homeowners consistently say that they were surprised how much maintenance costs.",
=======
"altText":"",
>>>>>>>
"alternative":"When the furnace springs a leak or a tree falls on the roof, these aren’t repairs that you can wait to make. New homeowners consistently say that they were surprised how much maintenance costs.",
"altText":"",
<<<<<<<
"alternative":"Think of all the little things that you are used to calling your landlord to deal with: a cracked window, a broken dishwasher, or a clogged toilet. As a homeowner, you will either have to fix these yourself or call and pay for a professional.",
=======
"altText":"",
>>>>>>>
"alternative":"Think of all the little things that you are used to calling your landlord to deal with: a cracked window, a broken dishwasher, or a clogged toilet. As a homeowner, you will either have to fix these yourself or call and pay for a professional.",
"altText": "", |
<<<<<<<
});
$('.expandable').expandable();
},
=======
},
componentDidMount: function() {
LoanStore.addChangeListener(this._onChange);
// tooltips
$(this.getDOMNode()).tooltip({
selector: '[data-toggle="tooltip"]',
'placement': 'bottom',
title: function getTooltipTitle(){
return $(this).attr('title') || $(this).next('.help-text').html() || 'Tooltip information.';
}
});
},
>>>>>>>
},
componentDidMount: function() {
LoanStore.addChangeListener(this._onChange);
// tooltips
$(this.getDOMNode()).tooltip({
selector: '[data-toggle="tooltip"]',
'placement': 'bottom',
title: function getTooltipTitle(){
return $(this).attr('title') || $(this).next('.help-text').html() || 'Tooltip information.';
}
});
$('.expandable').expandable();
}, |
<<<<<<<
const { match } = this.props;
=======
const { newChart, timeToSave, autosave } = this.state;
>>>>>>>
const { newChart, timeToSave, autosave } = this.state;
const { match } = this.props;
<<<<<<<
if (prevState.canCreate !== 1
&& prevState.canCreate !== 0
&& !match.params.chartId
) {
this._canCreateChart();
}
=======
// update the draft if it's already created and only if it's a draft
if (!_.isEqual(prevState.newChart, newChart) && timeToSave && newChart.id && autosave) {
this._updateDraft();
}
>>>>>>>
if (prevState.canCreate !== 1
&& prevState.canCreate !== 0
&& !match.params.chartId
) {
this._canCreateChart();
}
// update the draft if it's already created and only if it's a draft
if (!_.isEqual(prevState.newChart, newChart) && timeToSave && newChart.id && autosave) {
this._updateDraft();
}
<<<<<<<
previewError, lcArrayError, createError, initialQuery,
removeModal, createLoading, removeLoading, limitationModal, canCreate
=======
previewError, lcArrayError, createError, autosave,
removeModal, createLoading, removeLoading,
>>>>>>>
previewError, lcArrayError, createError, autosave,
removeModal, createLoading, removeLoading, limitationModal, canCreate |
<<<<<<<
getProjectCharts, runQuery, onPrint,
=======
getProjectCharts, runQuery, changeOrder, user, team,
>>>>>>>
getProjectCharts, runQuery, changeOrder, user, team, onPrint,
<<<<<<<
onPrint: PropTypes.func.isRequired,
=======
changeOrder: PropTypes.func.isRequired,
>>>>>>>
onPrint: PropTypes.func.isRequired,
changeOrder: PropTypes.func.isRequired, |
<<<<<<<
const LimitationController = require("./LimitationController");
=======
const ChartCacheController = require("./ChartCacheController");
>>>>>>>
const ChartCacheController = require("./ChartCacheController");
const LimitationController = require("./LimitationController");
<<<<<<<
this.limitation = new LimitationController();
=======
this.chartCache = new ChartCacheController();
>>>>>>>
this.chartCache = new ChartCacheController();
this.limitation = new LimitationController(); |
<<<<<<<
/* globals require, module */
=======
/* jshint -W079 */ // history.location
/* globals require, module */
>>>>>>>
/* jshint laxcomma:true */
/* jshint -W079 */ // history.location
/* jshint -W014 */
/* globals require, module */
<<<<<<<
if ('/' == path[0] && 0 !== path.indexOf(base)) path = base + path;
=======
if ('/' === path[0] && 0 !== path.indexOf(base)) path = base + path;
>>>>>>>
if ('/' === path[0] && 0 !== path.indexOf(base)) path = base + path;
<<<<<<<
var keys = this.keys,
qsIndex = path.indexOf('?'),
pathname = ~qsIndex ? path.slice(0, qsIndex) : path,
m = this.regexp.exec(decodeURIComponent(pathname));
=======
var keys = this.keys,
qsIndex = path.indexOf('?'),
pathname = ~qsIndex
? path.slice(0, qsIndex)
: path,
m = this.regexp.exec(decodeURIComponent(pathname));
>>>>>>>
var keys = this.keys,
qsIndex = path.indexOf('?'),
pathname = ~qsIndex
? path.slice(0, qsIndex)
: path,
m = this.regexp.exec(decodeURIComponent(pathname));
<<<<<<<
return null === e.which ? e.button : e.which;
=======
return null === e.which
? e.button
: e.which;
>>>>>>>
return null === e.which
? e.button
: e.which;
<<<<<<<
return (href && (0 === href.indexOf(origin)));
}
=======
return href && (0 === href.indexOf(origin));
}
page.sameOrigin = sameOrigin;
>>>>>>>
return (href && (0 === href.indexOf(origin)));
}
page.sameOrigin = sameOrigin; |
<<<<<<<
ctx.pushState();
if (false !== dispatch) page.dispatch(ctx);
=======
if (!ctx.unhandled) ctx.pushState();
if (false !== dispatch) page.dispatch(ctx);
>>>>>>>
ctx.pushState();
if (false !== dispatch) page.dispatch(ctx);
<<<<<<<
=======
var current = location.pathname + location.search;
if (current == ctx.canonicalPath) return;
>>>>>>>
<<<<<<<
return (href && (0 == href.indexOf(origin)));
=======
return href && (0 === href.indexOf(origin));
>>>>>>>
return (href && (0 === href.indexOf(origin))); |
<<<<<<<
it('日時差', () => {
cmp('「2017/03/06」から「2018/03/06」までの年数差。それを表示', '1')
cmp('「2017/03/06」と「2018/03/06」の年数差。それを表示', '1')
cmp('「2018/03/06」から「2017/03/06」までの年数差。それを表示', '-1')
cmp('「2018/03/06」と「2017/03/06」の年数差。それを表示', '-1')
cmp('「2017/03/06」から「2017/04/06」までの月数差。それを表示', '1')
cmp('「2017/03/06」と「2017/04/06」の月数差。それを表示', '1')
cmp('「2017/04/06」から「2017/03/06」までの月数差。それを表示', '-1')
cmp('「2017/04/06」と「2017/03/06」の月数差。それを表示', '-1')
cmp('「2017/03/06」から「2017/04/06」までの日数差。それを表示', '31')
cmp('「2017/03/06」と「2017/04/06」の日数差。それを表示', '31')
cmp('「2017/04/06」から「2017/03/06」までの日数差。それを表示', '-31')
cmp('「2017/04/06」と「2017/03/06」の日数差。それを表示', '-31')
cmp('「2017/03/06 00:00:00」から「2017/03/06 12:00:00」までの時間差。それを表示', '12')
cmp('「2017/03/06 00:00:00」と「2017/03/06 12:00:00」の時間差。それを表示', '12')
cmp('「00:00:00」から「12:00:00」までの時間差。それを表示', '12')
cmp('「00:00:00」と「12:00:00」の時間差。それを表示', '12')
cmp('「2017/03/06 12:00:00」から「2017/03/06 00:00:00」までの時間差。それを表示', '-12')
cmp('「2017/03/06 12:00:00」と「2017/03/06 00:00:00」の時間差。それを表示', '-12')
cmp('「12:00:00」から「00:00:00」までの時間差。それを表示', '-12')
cmp('「12:00:00」と「00:00:00」の時間差。それを表示', '-12')
cmp('「2017/03/06 00:00:00」から「2017/03/06 00:59:00」までの分差。それを表示', '59')
cmp('「2017/03/06 00:00:00」と「2017/03/06 00:59:00」の分差。それを表示', '59')
cmp('「00:00:00」から「00:59:00」までの分差。それを表示', '59')
cmp('「00:00:00」と「00:59:00」の分差。それを表示', '59')
cmp('「2017/03/06 00:59:00」から「2017/03/06 00:00:00」までの分差。それを表示', '-59')
cmp('「2017/03/06 00:59:00」と「2017/03/06 00:00:00」の分差。それを表示', '-59')
cmp('「00:59:00」から「00:00:00」までの分差。それを表示', '-59')
cmp('「00:59:00」と「00:00:00」の分差。それを表示', '-59')
cmp('「2017/03/06 00:00:00」から「2017/03/06 00:00:59」までの秒差。それを表示', '59')
cmp('「2017/03/06 00:00:00」と「2017/03/06 00:00:59」の秒差。それを表示', '59')
cmp('「00:00:00」から「00:00:59」までの秒差。それを表示', '59')
cmp('「00:00:00」と「00:00:59」の秒差。それを表示', '59')
cmp('「2017/03/06 00:00:59」から「2017/03/06 00:00:00」までの秒差。それを表示', '-59')
cmp('「2017/03/06 00:00:59」と「2017/03/06 00:00:00」の秒差。それを表示', '-59')
cmp('「00:00:59」から「00:00:00」までの秒差。それを表示', '-59')
cmp('「00:00:59」と「00:00:00」の秒差。それを表示', '-59')
})
=======
it('日時加算', () => {
cmp('「2017/03/06 00:00:01」に「+01:02:03」を時間加算。それを表示', '2017/03/06 01:02:04')
cmp('「00:00:01」に「+01:02:03」を時間加算。それを表示', '01:02:04')
cmp('「2017/03/06 00:00:01」に「-01:02:03」を時間加算。それを表示', '2017/03/05 22:57:58')
cmp('「00:00:01」に「-01:02:03」を時間加算。それを表示', '22:57:58')
cmp('「2017/03/06 00:00:01」に「+1年」を日時加算。それを表示', '2018/03/06 00:00:01')
cmp('「2017/03/06」に「+1年」を日時加算。それを表示', '2018/03/06')
cmp('「2017/03/06 00:00:01」に「+1ヶ月」を日時加算。それを表示', '2017/04/06 00:00:01')
cmp('「2017/03/06」に「+1ヶ月」を日時加算。それを表示', '2017/04/06')
cmp('「2017/03/06 00:00:01」に「+1日」を日時加算。それを表示', '2017/03/07 00:00:01')
cmp('「2017/03/06」に「+1日」を日時加算。それを表示', '2017/03/07')
cmp('「2017/03/06 00:00:01」に「+1時間」を日時加算。それを表示', '2017/03/06 01:00:01')
cmp('「00:00:01」に「+1時間」を日時加算。それを表示', '01:00:01')
cmp('「2017/03/06 00:00:01」に「+2分」を日時加算。それを表示', '2017/03/06 00:02:01')
cmp('「00:00:01」に「+2分」を日時加算。それを表示', '00:02:01')
cmp('「2017/03/06 00:00:01」に「+3秒」を日時加算。それを表示', '2017/03/06 00:00:04')
cmp('「00:00:01」に「+3秒」を日時加算。それを表示', '00:00:04')
cmp('「2017/03/06 00:00:01」に「-1年」を日時加算。それを表示', '2016/03/06 00:00:01')
cmp('「2017/03/06」に「-1年」を日時加算。それを表示', '2016/03/06')
cmp('「2017/03/06 00:00:01」に「-1ヶ月」を日時加算。それを表示', '2017/02/06 00:00:01')
cmp('「2017/03/06」に「-1ヶ月」を日時加算。それを表示', '2017/02/06')
cmp('「2017/03/06 00:00:01」に「-1日」を日時加算。それを表示', '2017/03/05 00:00:01')
cmp('「2017/03/06」に「-1日」を日時加算。それを表示', '2017/03/05')
cmp('「2017/03/06 00:00:01」に「-1時間」を日時加算。それを表示', '2017/03/05 23:00:01')
cmp('「00:00:01」に「-1時間」を日時加算。それを表示', '23:00:01')
cmp('「2017/03/06 00:00:01」に「-2分」を日時加算。それを表示', '2017/03/05 23:58:01')
cmp('「00:00:01」に「-2分」を日時加算。それを表示', '23:58:01')
cmp('「2017/03/06 00:00:01」に「-3秒」を日時加算。それを表示', '2017/03/05 23:59:58')
cmp('「00:00:01」に「-3秒」を日時加算。それを表示', '23:59:58')
cmp('「2017/03/06 00:00:01」に「+0001/02/03」を日付加算。それを表示', '2018/05/09 00:00:01')
cmp('「2017/03/06」に「+0001/02/03」を日付加算。それを表示', '2018/05/09')
cmp('「2017/03/06 00:00:01」に「-0001/02/03」を日付加算。それを表示', '2016/01/03 00:00:01')
cmp('「2017/03/06」に「-0001/02/03」を日付加算。それを表示', '2016/01/03')
})
>>>>>>>
it('日時差', () => {
cmp('「2017/03/06」から「2018/03/06」までの年数差。それを表示', '1')
cmp('「2017/03/06」と「2018/03/06」の年数差。それを表示', '1')
cmp('「2018/03/06」から「2017/03/06」までの年数差。それを表示', '-1')
cmp('「2018/03/06」と「2017/03/06」の年数差。それを表示', '-1')
cmp('「2017/03/06」から「2017/04/06」までの月数差。それを表示', '1')
cmp('「2017/03/06」と「2017/04/06」の月数差。それを表示', '1')
cmp('「2017/04/06」から「2017/03/06」までの月数差。それを表示', '-1')
cmp('「2017/04/06」と「2017/03/06」の月数差。それを表示', '-1')
cmp('「2017/03/06」から「2017/04/06」までの日数差。それを表示', '31')
cmp('「2017/03/06」と「2017/04/06」の日数差。それを表示', '31')
cmp('「2017/04/06」から「2017/03/06」までの日数差。それを表示', '-31')
cmp('「2017/04/06」と「2017/03/06」の日数差。それを表示', '-31')
cmp('「2017/03/06 00:00:00」から「2017/03/06 12:00:00」までの時間差。それを表示', '12')
cmp('「2017/03/06 00:00:00」と「2017/03/06 12:00:00」の時間差。それを表示', '12')
cmp('「00:00:00」から「12:00:00」までの時間差。それを表示', '12')
cmp('「00:00:00」と「12:00:00」の時間差。それを表示', '12')
cmp('「2017/03/06 12:00:00」から「2017/03/06 00:00:00」までの時間差。それを表示', '-12')
cmp('「2017/03/06 12:00:00」と「2017/03/06 00:00:00」の時間差。それを表示', '-12')
cmp('「12:00:00」から「00:00:00」までの時間差。それを表示', '-12')
cmp('「12:00:00」と「00:00:00」の時間差。それを表示', '-12')
cmp('「2017/03/06 00:00:00」から「2017/03/06 00:59:00」までの分差。それを表示', '59')
cmp('「2017/03/06 00:00:00」と「2017/03/06 00:59:00」の分差。それを表示', '59')
cmp('「00:00:00」から「00:59:00」までの分差。それを表示', '59')
cmp('「00:00:00」と「00:59:00」の分差。それを表示', '59')
cmp('「2017/03/06 00:59:00」から「2017/03/06 00:00:00」までの分差。それを表示', '-59')
cmp('「2017/03/06 00:59:00」と「2017/03/06 00:00:00」の分差。それを表示', '-59')
cmp('「00:59:00」から「00:00:00」までの分差。それを表示', '-59')
cmp('「00:59:00」と「00:00:00」の分差。それを表示', '-59')
cmp('「2017/03/06 00:00:00」から「2017/03/06 00:00:59」までの秒差。それを表示', '59')
cmp('「2017/03/06 00:00:00」と「2017/03/06 00:00:59」の秒差。それを表示', '59')
cmp('「00:00:00」から「00:00:59」までの秒差。それを表示', '59')
cmp('「00:00:00」と「00:00:59」の秒差。それを表示', '59')
cmp('「2017/03/06 00:00:59」から「2017/03/06 00:00:00」までの秒差。それを表示', '-59')
cmp('「2017/03/06 00:00:59」と「2017/03/06 00:00:00」の秒差。それを表示', '-59')
cmp('「00:00:59」から「00:00:00」までの秒差。それを表示', '-59')
cmp('「00:00:59」と「00:00:00」の秒差。それを表示', '-59')
})
it('日時加算', () => {
cmp('「2017/03/06 00:00:01」に「+01:02:03」を時間加算。それを表示', '2017/03/06 01:02:04')
cmp('「00:00:01」に「+01:02:03」を時間加算。それを表示', '01:02:04')
cmp('「2017/03/06 00:00:01」に「-01:02:03」を時間加算。それを表示', '2017/03/05 22:57:58')
cmp('「00:00:01」に「-01:02:03」を時間加算。それを表示', '22:57:58')
cmp('「2017/03/06 00:00:01」に「+1年」を日時加算。それを表示', '2018/03/06 00:00:01')
cmp('「2017/03/06」に「+1年」を日時加算。それを表示', '2018/03/06')
cmp('「2017/03/06 00:00:01」に「+1ヶ月」を日時加算。それを表示', '2017/04/06 00:00:01')
cmp('「2017/03/06」に「+1ヶ月」を日時加算。それを表示', '2017/04/06')
cmp('「2017/03/06 00:00:01」に「+1日」を日時加算。それを表示', '2017/03/07 00:00:01')
cmp('「2017/03/06」に「+1日」を日時加算。それを表示', '2017/03/07')
cmp('「2017/03/06 00:00:01」に「+1時間」を日時加算。それを表示', '2017/03/06 01:00:01')
cmp('「00:00:01」に「+1時間」を日時加算。それを表示', '01:00:01')
cmp('「2017/03/06 00:00:01」に「+2分」を日時加算。それを表示', '2017/03/06 00:02:01')
cmp('「00:00:01」に「+2分」を日時加算。それを表示', '00:02:01')
cmp('「2017/03/06 00:00:01」に「+3秒」を日時加算。それを表示', '2017/03/06 00:00:04')
cmp('「00:00:01」に「+3秒」を日時加算。それを表示', '00:00:04')
cmp('「2017/03/06 00:00:01」に「-1年」を日時加算。それを表示', '2016/03/06 00:00:01')
cmp('「2017/03/06」に「-1年」を日時加算。それを表示', '2016/03/06')
cmp('「2017/03/06 00:00:01」に「-1ヶ月」を日時加算。それを表示', '2017/02/06 00:00:01')
cmp('「2017/03/06」に「-1ヶ月」を日時加算。それを表示', '2017/02/06')
cmp('「2017/03/06 00:00:01」に「-1日」を日時加算。それを表示', '2017/03/05 00:00:01')
cmp('「2017/03/06」に「-1日」を日時加算。それを表示', '2017/03/05')
cmp('「2017/03/06 00:00:01」に「-1時間」を日時加算。それを表示', '2017/03/05 23:00:01')
cmp('「00:00:01」に「-1時間」を日時加算。それを表示', '23:00:01')
cmp('「2017/03/06 00:00:01」に「-2分」を日時加算。それを表示', '2017/03/05 23:58:01')
cmp('「00:00:01」に「-2分」を日時加算。それを表示', '23:58:01')
cmp('「2017/03/06 00:00:01」に「-3秒」を日時加算。それを表示', '2017/03/05 23:59:58')
cmp('「00:00:01」に「-3秒」を日時加算。それを表示', '23:59:58')
cmp('「2017/03/06 00:00:01」に「+0001/02/03」を日付加算。それを表示', '2018/05/09 00:00:01')
cmp('「2017/03/06」に「+0001/02/03」を日付加算。それを表示', '2018/05/09')
cmp('「2017/03/06 00:00:01」に「-0001/02/03」を日付加算。それを表示', '2016/01/03 00:00:01')
cmp('「2017/03/06」に「-0001/02/03」を日付加算。それを表示', '2016/01/03')
}) |
<<<<<<<
var botSubscriptionNotifier = require('./services/BotSubscriptionNotifier');
botSubscriptionNotifier.start();
//var faqBotHandler = require('./services/faqBotHandler');
//faqBotHandler.listen();
var activityArchiver = require('./services/activityArchiver');
activityArchiver.listen();
//var chat21Handler = require('./channels/chat21/chat21Handler');
//chat21Handler.listen();
var ReqLog = require("./models/reqlog");
=======
>>>>>>>
var botSubscriptionNotifier = require('./services/BotSubscriptionNotifier');
botSubscriptionNotifier.start();
//var faqBotHandler = require('./services/faqBotHandler');
//faqBotHandler.listen();
var activityArchiver = require('./services/activityArchiver');
activityArchiver.listen();
//var chat21Handler = require('./channels/chat21/chat21Handler');
//chat21Handler.listen();
var ReqLog = require("./models/reqlog");
<<<<<<<
res.send('Hello from Tiledesk server. It\'s UP. See the documentation here http://docs.tiledesk.com.');
=======
// cache.route(), // cache entry name is `cache.prefix + "/"`
res.send('Chat21 API index page. See the documentation.');
>>>>>>>
res.send('Hello from Tiledesk server. It\'s UP. See the documentation here http://docs.tiledesk.com.'); |
<<<<<<<
import { action, computed } from "mobx";
=======
import { computed, action } from "mobx";
>>>>>>>
import { computed, action } from "mobx";
<<<<<<<
@action
import = async (file: File) => {
const formData = new FormData();
formData.append("type", "outline");
formData.append("file", file);
const res = await client.post("/collections.import", formData);
invariant(res && res.data, "Data should be available");
this.addPolicies(res.policies);
res.data.collections.forEach(this.add);
return res.data;
};
=======
@action
async update(params: Object): Promise<Collection> {
const result = await super.update(params);
// If we're changing sharing permissions on the collection then we need to
// remove all locally cached policies for documents in the collection as they
// are now invalid
if (params.sharing !== undefined) {
const collection = this.get(params.id);
if (collection) {
collection.documentIds.forEach((id) => {
this.rootStore.policies.remove(id);
});
}
}
return result;
}
>>>>>>>
@action
import = async (file: File) => {
const formData = new FormData();
formData.append("type", "outline");
formData.append("file", file);
const res = await client.post("/collections.import", formData);
invariant(res && res.data, "Data should be available");
this.addPolicies(res.policies);
res.data.collections.forEach(this.add);
return res.data;
};
async update(params: Object): Promise<Collection> {
const result = await super.update(params);
// If we're changing sharing permissions on the collection then we need to
// remove all locally cached policies for documents in the collection as they
// are now invalid
if (params.sharing !== undefined) {
const collection = this.get(params.id);
if (collection) {
collection.documentIds.forEach((id) => {
this.rootStore.policies.remove(id);
});
}
}
return result;
} |
<<<<<<<
// Build containment dimensions
=======
// Build dimensions for containment
>>>>>>>
// Build containment dimensions
<<<<<<<
* @param {Number} [opts.dValue] Think of a transform matrix as four values a, b, c, d
* where a/d are the horizontal/vertical scale values and b/c are the skew values
* (5 and 6 of matrix array are the tx/ty transform values).
=======
* @param {Array} [opts.matrix] Optionally pass the current matrix so it doesn't need to be retrieved
* @param {Number} [opts.dValue] Think of a transform matrix as four values a, b, c, d (where a/d are the horizontal/vertical scale values and b/c are the skew values) (5 and 6 of matrix array are the tx/ty transform values).
>>>>>>>
* @param {Array} [opts.matrix] Optionally pass the current matrix so it doesn't need to be retrieved
* @param {Number} [opts.dValue] Think of a transform matrix as four values a, b, c, d
* where a/d are the horizontal/vertical scale values and b/c are the skew values
* (5 and 6 of matrix array are the tx/ty transform values).
<<<<<<<
var animate = false;
// Extend default options
opts = $.extend( {}, options, opts );
// Get the current matrix
var matrix = this.getMatrix();
=======
var matrix = opts.matrix || this.getMatrix();
if ( !options.disableZoom ) {
// Set the middle point
var middle = opts.middle;
if ( middle ) {
matrix[4] = +matrix[4] + (middle.pageX === matrix[4] ? 0 : middle.pageX > matrix[4] ? 1 : -1);
matrix[5] = +matrix[5] + (middle.pageY === matrix[5] ? 0 : middle.pageY > matrix[5] ? 1 : -1);
}
>>>>>>>
var animate = false;
var matrix = opts.matrix || this.getMatrix();
if ( !options.disableZoom ) {
// Set the middle point
var middle = opts.middle;
if ( middle ) {
matrix[4] = +matrix[4] + (middle.pageX === matrix[4] ? 0 : middle.pageX > matrix[4] ? 1 : -1);
matrix[5] = +matrix[5] + (middle.pageY === matrix[5] ? 0 : middle.pageY > matrix[5] ? 1 : -1);
}
<<<<<<<
var $parent = this.$parent;
this.container = {
width: $parent.width(),
height: $parent.height()
};
var elem = this.elem;
var $elem = this.$elem;
this.dimensions = this.isSVG ? {
left: elem.getAttribute('x') || 0,
top: elem.getAttribute('y') || 0,
width: elem.getAttribute('width') || $elem.width(),
height: elem.getAttribute('height') || $elem.height()
} : {
left: $.css( elem, 'left', true ) || 0,
top: $.css( elem, 'top', true ) || 0,
width: $elem.width(),
height: $elem.height()
};
=======
var $parent = this.$parent;
this.container = {
width: $parent.width(),
height: $parent.height()
};
var elem = this.elem;
var $elem = this.$elem;
this.dimensions = this.isSVG ? {
left: elem.getAttribute('x') || 0,
top: elem.getAttribute('y') || 0,
width: elem.getAttribute('width') || $elem.width(),
height: elem.getAttribute('height') || $elem.height()
} : {
left: $.css( elem, 'left', true ) || 0,
top: $.css( elem, 'top', true ) || 0,
width: $elem.width(),
height: $elem.height()
};
},
/**
* Checks dimensions to make sure they don't need to be re-calculated
*/
_checkDims: function() {
var dims = this.dimensions;
// Rebuild if width or height is still 0
if ( !dims.width || !dims.height ) {
this._buildContain();
}
return this.dimensions;
>>>>>>>
var $parent = this.$parent;
this.container = {
width: $parent.width(),
height: $parent.height()
};
var elem = this.elem;
var $elem = this.$elem;
this.dimensions = this.isSVG ? {
left: elem.getAttribute('x') || 0,
top: elem.getAttribute('y') || 0,
width: elem.getAttribute('width') || $elem.width(),
height: elem.getAttribute('height') || $elem.height()
} : {
left: $.css( elem, 'left', true ) || 0,
top: $.css( elem, 'top', true ) || 0,
width: $elem.width(),
height: $elem.height()
};
},
/**
* Checks dimensions to make sure they don't need to be re-calculated
*/
_checkDims: function() {
var dims = this.dimensions;
// Rebuild if width or height is still 0
if ( !dims.width || !dims.height ) {
this._buildContain();
}
return this.dimensions; |
<<<<<<<
this._uninstallResizeListener();
this._cancelScheduledDebounce();
=======
if (typeof FastBoot === 'undefined') {
this._uninstallResizeListener();
}
>>>>>>>
if (typeof FastBoot === 'undefined') {
this._uninstallResizeListener();
}
this._cancelScheduledDebounce(); |
<<<<<<<
import { Button, HeartbeatLoader, Text, TextGroup, Link, Icon } from 'blockchain-info-components'
import { Form, ColLeft, ColRight, InputWrapper, PartnerHeader, PartnerSubHeader, FieldMimic,
ButtonWrapper, ErrorWrapper, ColRightInner } from 'components/IdentityVerification'
=======
import {
Button,
HeartbeatLoader,
Text,
TextGroup,
Link,
Icon
} from 'blockchain-info-components'
import {
Form,
ColLeft,
ColRight,
InputWrapper,
PartnerHeader,
PartnerSubHeader,
ButtonWrapper,
ErrorWrapper,
ColRightInner
} from 'components/BuySell/Signup'
>>>>>>>
import {
Button,
HeartbeatLoader,
Text,
TextGroup,
Link,
Icon
} from 'blockchain-info-components'
import {
Form,
ColLeft,
ColRight,
InputWrapper,
PartnerHeader,
PartnerSubHeader,
FieldMimic,
ButtonWrapper,
ErrorWrapper,
ColRightInner
} from 'components/IdentityVerification'
<<<<<<<
=======
const FieldBox = styled.div`
border: 1px solid #dddddd;
padding: 5px 15px;
display: flex;
flex-direction: row;
width: 85%;
justify-content: space-between;
${media.mobile`
border: none;
width: 100%;
padding: 0px;
flex-direction: column;
width: fit-content;
`};
`
>>>>>>> |
<<<<<<<
<ThemeProvider>
<MediaContextProvider>
<ConnectedRouter history={history}>
<Switch>
<PublicLayout path='/login' component={Login} />
<PublicLayout path='/logout' component={Logout} />
<PublicLayout path='/help' component={Help} />
<PublicLayout path='/recover' component={Recover} />
<PublicLayout path='/reminder' component={Reminder} />
<PublicLayout path='/reset-2fa' component={Reset2FA} />
<PublicLayout
path='/reset-two-factor'
component={Reset2FAToken}
/>
<PublicLayout
path='/verify-email'
component={VerifyEmailToken}
/>
<PublicLayout path='/signup' component={Register} />
<PublicLayout
path='/authorize-approve'
component={AuthorizeLogin}
/>
<PublicLayout
path='/upload-document/success'
component={UploadDocumentsSuccess}
exact
/>
<PublicLayout
path='/upload-document/:token'
component={UploadDocuments}
/>
<PublicLayout path='/wallet' component={Login} />
<WalletLayout path='/home' component={Home} />
<WalletLayout path='/buy-sell' component={BuySell} />
<WalletLayout
path='/btc/transactions'
component={Transactions}
coin='BTC'
/>
<WalletLayout
path='/eth/transactions'
component={Transactions}
coin='ETH'
/>
<WalletLayout
path='/bch/transactions'
component={Transactions}
coin='BCH'
/>
<WalletLayout
path='/xlm/transactions'
component={Transactions}
coin='XLM'
/>
<WalletLayout
path='/exchange/history'
component={ExchangeHistory}
/>
<WalletLayout path='/exchange' component={Exchange} exact />
<WalletLayout
path='/security-center'
component={SecurityCenter}
/>
<WalletLayout path='/settings/profile' component={Profile} />
<WalletLayout
path='/settings/preferences'
component={Preferences}
/>
<WalletLayout
path='/settings/addresses/btc/:index'
component={BtcManageAddresses}
/>
<WalletLayout
path='/settings/addresses/btc'
component={Addresses}
exact
/>
<WalletLayout
path='/settings/addresses/bch'
component={BchAddresses}
/>
<WalletLayout path='/settings/general' component={General} />
<WalletLayout path='/lockbox' component={Lockbox} exact />
<WalletLayout
path='/lockbox/dashboard/:deviceIndex'
component={LockboxDashboard}
exact
/>
<WalletLayout
path='/lockbox/onboard'
component={LockboxOnboard}
exact
/>
<WalletLayout
path='/lockbox/settings/:deviceIndex'
component={LockboxDashboard}
exact
/>
<Redirect from='/' to='/login' />
</Switch>
</ConnectedRouter>
<FontGlobalStyles />
<IconGlobalStyles />
</MediaContextProvider>
</ThemeProvider>
=======
<PersistGate loading={null} persistor={persistor}>
<ThemeProvider>
<MediaContextProvider>
<ConnectedRouter history={history}>
<Switch>
<PublicLayout path='/login' component={Login} />
<PublicLayout path='/logout' component={Logout} />
<PublicLayout path='/help' component={Help} />
<PublicLayout path='/recover' component={Recover} />
<PublicLayout path='/reminder' component={Reminder} />
<PublicLayout path='/reset-2fa' component={Reset2FA} />
<PublicLayout
path='/reset-two-factor'
component={Reset2FAToken}
/>
<PublicLayout
path='/verify-email'
component={VerifyEmailToken}
/>
<PublicLayout path='/signup' component={Register} />
<PublicLayout
path='/authorize-approve'
component={AuthorizeLogin}
/>
<PublicLayout
path='/upload-document/success'
component={UploadDocumentsSuccess}
exact
/>
<PublicLayout
path='/upload-document/:token'
component={UploadDocuments}
/>
<PublicLayout path='/wallet' component={Login} />
<WalletLayout path='/home' component={Home} />
<WalletLayout path='/buy-sell' component={BuySell} />
<WalletLayout
path='/btc/transactions'
component={Transactions}
coin='BTC'
/>
<WalletLayout
path='/eth/transactions'
component={Transactions}
coin='ETH'
/>
<WalletLayout
path='/bch/transactions'
component={Transactions}
coin='BCH'
/>
<WalletLayout
path='/xlm/transactions'
component={Transactions}
coin='XLM'
/>
<WalletLayout
path='/exchange/history'
component={ExchangeHistory}
/>
<WalletLayout path='/exchange' component={Exchange} exact />
<WalletLayout
path='/security-center'
component={SecurityCenter}
/>
<WalletLayout
path='/settings/profile'
component={Profile}
/>
<WalletLayout
path='/settings/preferences'
component={Preferences}
/>
<WalletLayout
path='/settings/addresses/btc/:index'
component={BtcManageAddresses}
/>
<WalletLayout
path='/settings/addresses/btc'
component={Addresses}
exact
/>
<WalletLayout
path='/settings/addresses/bch'
component={BchAddresses}
/>
<WalletLayout
path='/settings/general'
component={General}
/>
<WalletLayout path='/lockbox' component={Lockbox} exact />
<WalletLayout
path='/lockbox/dashboard/:deviceIndex'
component={LockboxDashboard}
exact
/>
<WalletLayout
path='/lockbox/onboard'
component={LockboxOnboard}
exact
/>
<WalletLayout
path='/lockbox/settings/:deviceIndex'
component={LockboxDashboard}
exact
/>
<Redirect from='/' to='/login' />
</Switch>
</ConnectedRouter>
</MediaContextProvider>
</ThemeProvider>
</PersistGate>
>>>>>>>
<PersistGate loading={null} persistor={persistor}>
<ThemeProvider>
<MediaContextProvider>
<ConnectedRouter history={history}>
<Switch>
<PublicLayout path='/login' component={Login} />
<PublicLayout path='/logout' component={Logout} />
<PublicLayout path='/help' component={Help} />
<PublicLayout path='/recover' component={Recover} />
<PublicLayout path='/reminder' component={Reminder} />
<PublicLayout path='/reset-2fa' component={Reset2FA} />
<PublicLayout
path='/reset-two-factor'
component={Reset2FAToken}
/>
<PublicLayout
path='/verify-email'
component={VerifyEmailToken}
/>
<PublicLayout path='/signup' component={Register} />
<PublicLayout
path='/authorize-approve'
component={AuthorizeLogin}
/>
<PublicLayout
path='/upload-document/success'
component={UploadDocumentsSuccess}
exact
/>
<PublicLayout
path='/upload-document/:token'
component={UploadDocuments}
/>
<PublicLayout path='/wallet' component={Login} />
<WalletLayout path='/home' component={Home} />
<WalletLayout path='/buy-sell' component={BuySell} />
<WalletLayout
path='/btc/transactions'
component={Transactions}
coin='BTC'
/>
<WalletLayout
path='/eth/transactions'
component={Transactions}
coin='ETH'
/>
<WalletLayout
path='/bch/transactions'
component={Transactions}
coin='BCH'
/>
<WalletLayout
path='/xlm/transactions'
component={Transactions}
coin='XLM'
/>
<WalletLayout
path='/exchange/history'
component={ExchangeHistory}
/>
<WalletLayout path='/exchange' component={Exchange} exact />
<WalletLayout
path='/security-center'
component={SecurityCenter}
/>
<WalletLayout
path='/settings/profile'
component={Profile}
/>
<WalletLayout
path='/settings/preferences'
component={Preferences}
/>
<WalletLayout
path='/settings/addresses/btc/:index'
component={BtcManageAddresses}
/>
<WalletLayout
path='/settings/addresses/btc'
component={Addresses}
exact
/>
<WalletLayout
path='/settings/addresses/bch'
component={BchAddresses}
/>
<WalletLayout
path='/settings/general'
component={General}
/>
<WalletLayout path='/lockbox' component={Lockbox} exact />
<WalletLayout
path='/lockbox/dashboard/:deviceIndex'
component={LockboxDashboard}
exact
/>
<WalletLayout
path='/lockbox/onboard'
component={LockboxOnboard}
exact
/>
<WalletLayout
path='/lockbox/settings/:deviceIndex'
component={LockboxDashboard}
exact
/>
<Redirect from='/' to='/login' />
</Switch>
</ConnectedRouter>
<FontGlobalStyles />
<IconGlobalStyles />
</MediaContextProvider>
</ThemeProvider>
</PersistGate> |
<<<<<<<
import lockbox from './lockbox/reducers.js'
=======
import userCredentials from './userCredentials/reducers.js'
>>>>>>>
import lockbox from './lockbox/reducers.js'
import userCredentials from './userCredentials/reducers.js'
<<<<<<<
[C.BTC]: btc,
[C.LOCKBOX]: lockbox
=======
[C.BTC]: btc,
[C.USER_CREDENTIALS]: userCredentials
>>>>>>>
[C.BTC]: btc,
[C.LOCKBOX]: lockbox,
[C.USER_CREDENTIALS]: userCredentials |
<<<<<<<
const getSymbol = currency => {
const data = Currencies[currency]
const tradeUnit = prop('trade', data)
return path(['units', tradeUnit, 'symbol'], data)
}
=======
const displayCoinToFiat = ({ fromCoin, value, fromUnit, toCurrency, rates }) => {
switch (fromCoin) {
case 'BTC': return displayBitcoinToFiat({ value, fromUnit, toCurrency, rates })
case 'ETH': return displayEtherToFiat({ value, fromUnit, toCurrency, rates })
}
}
>>>>>>>
const displayCoinToFiat = ({ fromCoin, value, fromUnit, toCurrency, rates }) => {
switch (fromCoin) {
case 'BTC': return displayBitcoinToFiat({ value, fromUnit, toCurrency, rates })
case 'ETH': return displayEtherToFiat({ value, fromUnit, toCurrency, rates })
}
}
const getSymbol = currency => {
const data = Currencies[currency]
const tradeUnit = prop('trade', data)
return path(['units', tradeUnit, 'symbol'], data)
}
<<<<<<<
displayCoinToCoin,
getSymbol
=======
displayCoinToCoin,
displayCoinToFiat
>>>>>>>
displayCoinToCoin,
displayCoinToFiat,
getSymbol |
<<<<<<<
// Passthrough whether the backend tile exists or not.
headers['x-vector-backend-status'] = head['x-vector-backend-status'];
=======
// Passthrough backend expires header if present.
if (head['Expires']||head['expires']) headers['Expires'] = head['Expires']||head['expires'];
>>>>>>>
// Passthrough backend expires header if present.
if (head['Expires']||head['expires']) headers['Expires'] = head['Expires']||head['expires'];
// Passthrough whether the backend tile exists or not.
headers['x-vector-backend-status'] = head['x-vector-backend-status']; |
<<<<<<<
selectors.core.kvStore.lockbox.getDevices,
=======
selectors.core.walletOptions.getBtcNetwork,
>>>>>>>
selectors.core.kvStore.lockbox.getDevices,
selectors.core.walletOptions.getBtcNetwork,
<<<<<<<
lockboxDevicesR,
=======
networkTypeR,
>>>>>>>
lockboxDevicesR,
networkTypeR,
<<<<<<<
const enableToggle =
btcAccountsLength + btcAddressesLength > 1 ||
!isEmpty(lockboxDevicesR.getOrElse({}))
=======
const networkType = networkTypeR.getOrElse('bitcoin')
const enableToggle = btcAccountsLength + btcAddressesLength > 1
>>>>>>>
const networkType = networkTypeR.getOrElse('bitcoin')
const enableToggle =
btcAccountsLength + btcAddressesLength > 1 ||
!isEmpty(lockboxDevicesR.getOrElse({})) |
<<<<<<<
export {
bch,
btc,
eth,
lockbox,
root,
userCredentials,
xlm
}
=======
export {
root,
eth,
buySell,
contacts,
bch,
btc,
lockbox,
userCredentials,
walletCredentials,
xlm
}
>>>>>>>
export {
root,
eth,
bch,
btc,
lockbox,
userCredentials,
walletCredentials,
xlm
} |
<<<<<<<
export const UPDATE_AUTO_LOGOUT_ERROR = '@CORE.UPDATE_AUTO_LOGOUT_ERROR'
export const UPDATE_LOGGING_LEVEL = '@CORE.UPDATE_LOGGING_LEVEL'
export const UPDATE_LOGGING_LEVEL_SUCCESS = '@CORE.UPDATE_LOGGING_LEVEL_SUCCESS'
export const UPDATE_LOGGING_LEVEL_ERROR = '@CORE.UPDATE_LOGGING_LEVEL_ERROR'
export const UPDATE_IP_LOCK = '@CORE.UPDATE_IP_LOCK'
export const UPDATE_IP_LOCK_SUCCESS = '@CORE.UPDATE_IP_LOCK_SUCCESS'
export const UPDATE_IP_LOCK_ERROR = '@CORE.UPDATE_IP_LOCK_ERROR'
export const UPDATE_IP_LOCK_ON = '@CORE.UPDATE_IP_LOCK_ON'
export const UPDATE_IP_LOCK_ON_SUCCESS = '@CORE.UPDATE_IP_LOCK_ON_SUCCESS'
export const UPDATE_IP_LOCK_ON_ERROR = '@CORE.UPDATE_IP_LOCK_ON_ERROR'
export const UPDATE_BLOCK_TOR_IPS = '@CORE.UPDATE_BLOCK_TOR_IPS'
export const UPDATE_BLOCK_TOR_IPS_SUCCESS = '@CORE.UPDATE_BLOCK_TOR_IPS_SUCCESS'
export const UPDATE_BLOCK_TOR_IPS_ERROR = '@CORE.UPDATE_BLOCK_TOR_IPS_ERROR'
=======
export const UPDATE_AUTO_LOGOUT_ERROR = '@CORE.UPDATE_AUTO_LOGOUT_ERROR'
export const UPDATE_HINT = '@CORE.UPDATE_HINT'
export const UPDATE_HINT_SUCCESS = '@CORE.UPDATE_HINT_SUCCESS'
export const UPDATE_HINT_ERROR = '@CORE.UPDATE_HINT_ERROR'
>>>>>>>
export const UPDATE_AUTO_LOGOUT_ERROR = '@CORE.UPDATE_AUTO_LOGOUT_ERROR'
export const UPDATE_LOGGING_LEVEL = '@CORE.UPDATE_LOGGING_LEVEL'
export const UPDATE_LOGGING_LEVEL_SUCCESS = '@CORE.UPDATE_LOGGING_LEVEL_SUCCESS'
export const UPDATE_LOGGING_LEVEL_ERROR = '@CORE.UPDATE_LOGGING_LEVEL_ERROR'
export const UPDATE_IP_LOCK = '@CORE.UPDATE_IP_LOCK'
export const UPDATE_IP_LOCK_SUCCESS = '@CORE.UPDATE_IP_LOCK_SUCCESS'
export const UPDATE_IP_LOCK_ERROR = '@CORE.UPDATE_IP_LOCK_ERROR'
export const UPDATE_IP_LOCK_ON = '@CORE.UPDATE_IP_LOCK_ON'
export const UPDATE_IP_LOCK_ON_SUCCESS = '@CORE.UPDATE_IP_LOCK_ON_SUCCESS'
export const UPDATE_IP_LOCK_ON_ERROR = '@CORE.UPDATE_IP_LOCK_ON_ERROR'
export const UPDATE_BLOCK_TOR_IPS = '@CORE.UPDATE_BLOCK_TOR_IPS'
export const UPDATE_BLOCK_TOR_IPS_SUCCESS = '@CORE.UPDATE_BLOCK_TOR_IPS_SUCCESS'
export const UPDATE_BLOCK_TOR_IPS_ERROR = '@CORE.UPDATE_BLOCK_TOR_IPS_ERROR'
export const UPDATE_HINT = '@CORE.UPDATE_HINT'
export const UPDATE_HINT_SUCCESS = '@CORE.UPDATE_HINT_SUCCESS'
export const UPDATE_HINT_ERROR = '@CORE.UPDATE_HINT_ERROR' |
<<<<<<<
<Text size='12px' weight={400}>
{props.coin}
=======
<Text size='12px' weight={300}>
{props.coinTicker ? props.coinTicker : props.coin}
>>>>>>>
<Text size='12px' weight={400}>
{props.coinTicker ? props.coinTicker : props.coin}
<<<<<<<
<Text size='12px' weight={400}>
{props.coin}
=======
<Text size='12px' weight={300}>
{props.coinTicker}
>>>>>>>
<Text size='12px' weight={400}>
{props.coinTicker} |
<<<<<<<
export default ({ api, coreSagas }) => {
const {
createLinkAccountId,
clearSession,
fetchUser,
linkAccount,
signIn
} = sagas({
=======
export default ({ api, coreSagas, networks }) => {
const {
clearSession,
fetchUser,
linkAccount,
shareAddresses,
signIn
} = sagas({
>>>>>>>
export default ({ api, coreSagas, networks }) => {
const {
clearSession,
createLinkAccountId,
fetchUser,
linkAccount,
shareAddresses,
signIn
} = sagas({
<<<<<<<
yield takeLatest(AT.CREATE_LINK_ACCOUNT_ID, createLinkAccountId)
=======
yield takeLatest(AT.SHARE_ADDRESSES, shareAddresses)
>>>>>>>
yield takeLatest(AT.CREATE_LINK_ACCOUNT_ID, createLinkAccountId)
yield takeLatest(AT.SHARE_ADDRESSES, shareAddresses) |
<<<<<<<
const calculateTo = function*(destinations, type, network) {
=======
const __calculateTo = function*(destinations, network) {
>>>>>>>
const __calculateTo = function*(destinations, type, network) {
<<<<<<<
const calculateFrom = function*(origin, type, network) {
=======
const __calculateFrom = function*(origin, network) {
>>>>>>>
const __calculateFrom = function*(origin, type, network) {
<<<<<<<
const calculateSignature = function*(
network,
password,
transport,
fromType,
selection
) {
=======
const __calculateSignature = function*(
network,
password,
fromType,
selection
) {
>>>>>>>
const __calculateSignature = function*(
network,
password,
transport,
fromType,
selection
) {
<<<<<<<
*to (destinations, type) {
let to = yield call(calculateTo, destinations, type, network)
=======
*to (destinations) {
let to = yield call(__calculateTo, destinations, network)
>>>>>>>
*to (destinations, type) {
let to = yield call(__calculateTo, destinations, network)
<<<<<<<
*from (origins, type) {
let fromData = yield call(calculateFrom, origins, type, network)
=======
*from (origins) {
let fromData = yield call(__calculateFrom, origins, network)
>>>>>>>
*from (origins, type) {
let fromData = yield call(__calculateFrom, origins, network)
<<<<<<<
transport,
p.fromType,
p.selection
=======
prop('fromType', p),
prop('selection', p)
>>>>>>>
transport,
prop('fromType', p),
prop('selection', p) |
<<<<<<<
import linkedinWhite from './img/linkedin-white.svg'
=======
import identityVerification from './img/identity-verification.svg'
import landingPageBannerOverlay from './img/landing-page-banner-overlay.jpg'
import landingPageBannerSmOverlay from './img/landing-page-banner-sm-overlay.jpg'
>>>>>>>
import identityVerification from './img/identity-verification.svg'
import landingPageBannerOverlay from './img/landing-page-banner-overlay.jpg'
import landingPageBannerSmOverlay from './img/landing-page-banner-sm-overlay.jpg'
import linkedinWhite from './img/linkedin-white.svg'
<<<<<<<
'linkedin-white': linkedinWhite,
=======
'identity-verification': identityVerification,
'landing-page-banner-overlay': landingPageBannerOverlay,
'landing-page-banner-sm-overlay': landingPageBannerSmOverlay,
>>>>>>>
'identity-verification': identityVerification,
'landing-page-banner-overlay': landingPageBannerOverlay,
'landing-page-banner-sm-overlay': landingPageBannerSmOverlay,
'linkedin-white': linkedinWhite, |
<<<<<<<
font-size: 18px;
margin: auto;
=======
margin: 0 15px;
>>>>>>>
font-size: 18px;
margin: 0 15px; |
<<<<<<<
yield put(actions.goals.saveGoal('kycCTA'))
=======
yield put(actions.goals.saveGoal('kyc'))
yield put(actions.goals.saveGoal('kycDocResubmit'))
yield put(actions.goals.saveGoal('bsv'))
>>>>>>>
yield put(actions.goals.saveGoal('kycCTA'))
yield put(actions.goals.saveGoal('kycDocResubmit'))
yield put(actions.goals.saveGoal('bsv')) |
<<<<<<<
import { address, networks } from 'bitcoinjs-lib'
=======
import { utils } from 'blockchain-wallet-v4/src'
>>>>>>>
import { address, networks } from 'bitcoinjs-lib'
import { utils } from 'blockchain-wallet-v4/src'
<<<<<<<
const validBitcoinAddress = value => {
try {
const addr = address.fromBase58Check(value)
const n = networks.bitcoin
const valid = or(equals(addr.version, n.pubKeyHash), equals(addr.version, n.scriptHash))
return !valid
} catch (e) { return 'Invalid Bitcoin Address' }
}
export {
required,
requiredNumber,
validBitcoinAddress,
validNumber,
validEmail,
validMmemonic,
validWalletId,
validMobileNumber,
validStrongPassword,
validIpList,
validPasswordStretchingNumber }
=======
const validEtherAddress = value => utils.ethereum.isValidAddress(value) ? undefined : 'Invalid address'
export { required, requiredNumber, validNumber, validEmail, validMmemonic, validWalletId, validMobileNumber, validStrongPassword, validIpList, validPasswordStretchingNumber, validEtherAddress }
>>>>>>>
const validEtherAddress = value => utils.ethereum.isValidAddress(value) ? undefined : 'Invalid address'
const validBitcoinAddress = value => {
try {
const addr = address.fromBase58Check(value)
const n = networks.bitcoin
const valid = or(equals(addr.version, n.pubKeyHash), equals(addr.version, n.scriptHash))
return !valid
} catch (e) { return 'Invalid Bitcoin Address' }
}
export { required, requiredNumber, validNumber, validEmail, validMmemonic, validWalletId, validMobileNumber, validStrongPassword, validIpList, validPasswordStretchingNumber, validBitcoinAddress, validEtherAddress } |
<<<<<<<
export const initSettingsInfo = function * () {
try {
yield call(sagas.core.settings.fetchSettings)
} catch (e) {
yield put(actions.alerts.displayError('Could not init settings info.'))
}
}
export const initSettingsPreferences = function * () {
try {
yield call(sagas.core.settings.fetchSettings)
} catch (e) {
yield put(actions.alerts.displayError('Could not init settings security.'))
}
}
export const initSettingsSecurity = function * () {
try {
yield call(sagas.core.settings.fetchSettings)
} catch (e) {
yield put(actions.alerts.displayError('Could not init settings security.'))
}
}
=======
export const showPairingCode = function * (action) {
try {
const encryptionPhrase = yield call(sagas.core.settings.encodePairingCode)
yield put(actions.modals.showModal('PairingCode', { data: encryptionPhrase }))
} catch (e) {
yield put(actions.alerts.displayError('Could not fetch pairing code.'))
}
}
>>>>>>>
export const initSettingsInfo = function * () {
try {
yield call(sagas.core.settings.fetchSettings)
} catch (e) {
yield put(actions.alerts.displayError('Could not init settings info.'))
}
}
export const initSettingsPreferences = function * () {
try {
yield call(sagas.core.settings.fetchSettings)
} catch (e) {
yield put(actions.alerts.displayError('Could not init settings security.'))
}
}
export const initSettingsSecurity = function * () {
try {
yield call(sagas.core.settings.fetchSettings)
} catch (e) {
yield put(actions.alerts.displayError('Could not init settings security.'))
}
}
<<<<<<<
yield takeLatest(AT.INIT_SETTINGS_INFO, initSettingsInfo)
yield takeLatest(AT.INIT_SETTINGS_PREFERENCES, initSettingsPreferences)
yield takeLatest(AT.INIT_SETTINGS_SECURITY, initSettingsSecurity)
=======
yield takeLatest(AT.SHOW_PAIRING_CODE, showPairingCode)
>>>>>>>
yield takeLatest(AT.INIT_SETTINGS_INFO, initSettingsInfo)
yield takeLatest(AT.INIT_SETTINGS_PREFERENCES, initSettingsPreferences) |
<<<<<<<
import addressesBch from './addressesBch/sagas'
=======
import coinify from './coinify/sagas'
>>>>>>>
import addressesBch from './addressesBch/sagas'
import coinify from './coinify/sagas'
<<<<<<<
call(addressesBch),
=======
call(coinify),
>>>>>>>
call(addressesBch),
call(coinify), |
<<<<<<<
<TabMenuItem
selected={value === ''}
onClick={() => handleClick('')}
data-e2e='transactionTabMenuAll'
>
=======
<TabMenuItem
className={value === '' ? 'active' : ''}
data-e2e='transactionTabMenuAll'
onClick={() => handleClick('')}
>
>>>>>>>
<TabMenuItem
className={value === '' ? 'active' : ''}
onClick={() => handleClick('')}
data-e2e='transactionTabMenuAll'
> |
<<<<<<<
yield takeLatest(AT.CANCEL_SUBSCRIPTION, coinifySagas.cancelSubscription)
=======
yield takeLatest(AT.CHECKOUT_CARD_MAX, coinifySagas.checkoutCardMax)
>>>>>>>
yield takeLatest(AT.CANCEL_SUBSCRIPTION, coinifySagas.cancelSubscription)
yield takeLatest(AT.CHECKOUT_CARD_MAX, coinifySagas.checkoutCardMax) |
<<<<<<<
<TierIcon name='down-arrow-filled' color='blue600' />
=======
<TierIcon name='chevron-right-large' color='brand-secondary' />
>>>>>>>
<TierIcon name='chevron-right-large' color='blue600' />
<<<<<<<
<TierIcon name='down-arrow-filled' color='blue600' />
=======
<TierIcon name='chevron-right-large' color='brand-secondary' />
>>>>>>>
<TierIcon name='chevron-right-large' color='blue600' /> |
<<<<<<<
const getCaptchaImage = (timestamp) => {
const data = { timestamp }
return request('GET', 'kaptcha.jpg', data)
}
const recoverWallet = (email, captcha) => {
const timestamp = new Date().getTime()
const data = { method: 'recover-wallet', email, captcha, ct: timestamp }
return request('POST', 'wallet', data)
}
const getUnspents = function (fromAddresses, confirmations) {
=======
const getUnspents = function (fromAddresses, confirmations = 0) {
>>>>>>>
const getCaptchaImage = (timestamp) => {
const data = { timestamp }
return request('GET', 'kaptcha.jpg', data)
}
const recoverWallet = (email, captcha) => {
const timestamp = new Date().getTime()
const data = { method: 'recover-wallet', email, captcha, ct: timestamp }
return request('POST', 'wallet', data)
}
const getUnspents = function (fromAddresses, confirmations = 0) { |
<<<<<<<
import * as addressesBch from './addressesBch/actions'
=======
import * as coinify from './coinify/actions'
>>>>>>>
import * as addressesBch from './addressesBch/actions'
import * as coinify from './coinify/actions'
<<<<<<<
addressesBch,
=======
coinify,
>>>>>>>
addressesBch,
coinify, |
<<<<<<<
const isNotNil = compose(not, isNil)
=======
var result = {}
>>>>>>>
const isNotNil = compose(not, isNil)
<<<<<<<
=======
})
const extractIntlComponent = (file) => {
fs.readFile(file, 'utf8', (err, data) => {
if (err) {
console.log('ERROR: ' + err)
return
}
let importSearchResults = data.match(regexIntlImport)
if (!R.isNil(importSearchResults)) {
let componentSearchResults = data.match(regexIntlComponent)
if (!R.isNil(componentSearchResults)) {
let elements = R.take(componentSearchResults.length, componentSearchResults)
R.map(element => {
let id = element.match(regexIntlId)
let message = element.match(regexIntlMessage)
if (R.isNil(id) | R.isNil(message)) {
console.log(`Could not add the key: ${id[1]}.`)
}
else {
console.log(id[1], message[1])
result = R.assoc(id[1], message[1], result)
}
outputFile()
}, elements)
}
}
})
>>>>>>>
<<<<<<<
export const toString = object => JSON.stringify(object, null, 2)
export const mapReducer = curry((acc, string) => merge(acc, toKeyValue(string)))
// script
filenames(rootPath + '/**/*.js')
.chain(readFiles)
.map(map(elements))
.map(filter(isNotNil))
.map(flatten)
.map(reduce(mapReducer, {}))
.map(toString)
.chain(writeFile(outputPath + '/' + outputFilename))
.fork(console.warn, console.log)
=======
const outputFile = () => {
console.log('RESULT', result)
fs.writeFile(outputPath + '/' + outputFilename, JSON.stringify(result, null, 2))
console.log(outputPath + '/' + outputFilename + ' generated !')
}
>>>>>>>
export const toString = object => JSON.stringify(object, null, 2)
export const mapReducer = curry((acc, string) => merge(acc, toKeyValue(string)))
// script
filenames(rootPath + '/**/*.js')
.chain(readFiles)
.map(map(elements))
.map(filter(isNotNil))
.map(flatten)
.map(reduce(mapReducer, {}))
.map(toString)
.chain(writeFile(outputPath + '/' + outputFilename))
.fork(console.warn, console.log) |
<<<<<<<
export const getIsAuthenticated = path(['application', 'auth', 'isAuthenticated'])
=======
export const getIsAuthenticated = path(['applicationState', 'auth', 'isAuthenticated'])
export const getAuthType = path(['applicationState', 'auth', 'authType'])
>>>>>>>
export const getIsAuthenticated = path(['application', 'auth', 'isAuthenticated'])
export const getAuthType = path(['application', 'auth', 'authType']) |
<<<<<<<
const VerifyWrapper = styled.div`
display: flex;
height: 100%;
flex-direction: row;
${media.mobile`
flex-direction: column;
`};
`
=======
>>>>>>>
const VerifyWrapper = styled.div`
display: flex;
height: 100%;
flex-direction: row;
${media.mobile`
flex-direction: column;
`};
`
<<<<<<<
<VerifyWrapper>
{showVeriff && <Veriff />}
{!showVeriff && (
<ColLeft>
<InputWrapper>
<IdentityVerificationHeader>
<FormattedMessage
id='identityverification.verify.header'
defaultMessage='Last Step. Verify Your ID'
/>
</IdentityVerificationHeader>
<IdentityVerificationImage name='identity-verification' />
<IdentityVerificationSubHeader>
<FormattedMessage
id='identityverification.verify.message'
defaultMessage='We need to confirm your identity with a government issued ID. Before proceeding, make sure you have one of the following forms of ID handy.'
/>
</IdentityVerificationSubHeader>
<DocumentsWrapper>
{map(flip(prop)(docMap), supportedDocuments)}
</DocumentsWrapper>
</InputWrapper>
</ColLeft>
)}
</VerifyWrapper>
=======
<InputWrapper>
<IdentityVerificationHeader>
<FormattedMessage
id='identityverification.verify.header'
defaultMessage='Last Step. Verify Your ID'
/>
</IdentityVerificationHeader>
<IdentityVerificationImage name='identity-verification' />
<IdentityVerificationSubHeader>
<FormattedMessage
id='identityverification.verify.message'
defaultMessage='We need to confirm your identity with a government issued ID. Before proceeding, make sure you have one of the following forms of ID handy.'
/>
</IdentityVerificationSubHeader>
<DocumentsWrapper>
{map(flip(prop)(docMap), supportedDocuments)}
</DocumentsWrapper>
</InputWrapper>
>>>>>>>
<VerifyWrapper>
{showVeriff && <Veriff />}
{!showVeriff && (
<InputWrapper>
<IdentityVerificationHeader>
<FormattedMessage
id='identityverification.verify.header'
defaultMessage='Last Step. Verify Your ID'
/>
</IdentityVerificationHeader>
<IdentityVerificationImage name='identity-verification' />
<IdentityVerificationSubHeader>
<FormattedMessage
id='identityverification.verify.message'
defaultMessage='We need to confirm your identity with a government issued ID. Before proceeding, make sure you have one of the following forms of ID handy.'
/>
</IdentityVerificationSubHeader>
<DocumentsWrapper>
{map(flip(prop)(docMap), supportedDocuments)}
</DocumentsWrapper>
</InputWrapper>
)}
</VerifyWrapper>
<<<<<<<
{!showVeriff && (
<Button
nature='primary'
data-e2e='lowflowContinueButton'
onClick={handleSubmit}
>
<FormattedMessage
id='identityverification.personal.continue'
defaultMessage='Continue'
/>
</Button>
)}
=======
<Button nature='primary' onClick={handleSubmit}>
<FormattedMessage
id='identityverification.lowflow.personal.continue'
defaultMessage='Continue'
/>
</Button>
>>>>>>>
{!showVeriff && (
<Button
nature='primary'
data-e2e='lowflowContinueButton'
onClick={handleSubmit}
>
<FormattedMessage
id='identityverification.lowflow.personal.continue'
defaultMessage='Continue'
/>
</Button>
)} |
<<<<<<<
import simpleBuy from './simpleBuy/sagas'
import transactionReport from './transactionReport/sagas'
=======
>>>>>>>
import simpleBuy from './simpleBuy/sagas'
<<<<<<<
simpleBuy: simpleBuy({ api, coreSagas, networks }),
transactionReport: transactionReport({ coreSagas }),
=======
>>>>>>>
simpleBuy: simpleBuy({ api, coreSagas, networks }), |
<<<<<<<
this.handleTrezor = this.handleTrezor.bind(this)
this.openMobileLogin = this.openMobileLogin.bind(this)
=======
>>>>>>>
this.openMobileLogin = this.openMobileLogin.bind(this)
<<<<<<<
handleTrezor (event) {
event.preventDefault()
this.props.coreActions.createTrezorWallet(0)
}
openMobileLogin () {
this.props.modalActions.showModal('MobileLogin')
}
=======
>>>>>>>
openMobileLogin () {
this.props.modalActions.showModal('MobileLogin')
}
<<<<<<<
<Login
handleSubmit={this.handleSubmit}
handleTrezor={this.handleTrezor}
openMobileLogin={this.openMobileLogin} />
=======
<Login handleSubmit={this.handleSubmit} />
>>>>>>>
<Login
handleSubmit={this.handleSubmit}
openMobileLogin={this.openMobileLogin} /> |
<<<<<<<
function issueTemplate() {
var colorMap = {};
=======
function issueTemplate() {
var colorMap = {
'project-issues' : 'color0',
'user-agent' : 'color3',
'platform' : 'color1',
'dispatcher' : 'color2'
};
>>>>>>>
function issueTemplate() {
var colorMap = {
'project-issues' : 'color0',
'user-agent' : 'color3',
'platform' : 'color1',
'dispatcher' : 'color2'
};
<<<<<<<
this.before('initialize', function () {
this.template = Hogan.compile(
'<div class="issue list-group-item {{repoName}} {{colorClass}}" id="{{id}}">' +
'<div class="issue-header">'+
'<a class="assigns-myself">' +
'<span class="empty-avatar">+</span>' +
'<span class="empty-avatar-label">ASSIGN ME</span>' +
'<img class="assignee-avatar" title="{{assignee.login}}" src="{{assignee.avatar_url}}" />' +
'</a>' +
'<a href="{{html_url}}" target="_blank"><span class="issue-number right">#{{number}}</span></a>' +
'</div>' +
'<div class="issue-body">' +
'<a class="title list-group-item-heading" href="{{html_url}}" target="_blank" data-toggle="tooltip" title="{{body}}" data-hint="Ctrl+C to Copy">' +
'{{title}}' +
'</a>' +
'</div>' +
'<div class="labels">'+
'{{#labelsName}}' +
'<span class="label" style="background: #{{color}};">{{name}}</span>' +
'{{/labelsName}}' +
'</div>' +
'</div>'
);
});
=======
this.before('initialize', function () {
this.template = Hogan.compile(
'<div class="issue list-group-item {{repoName}} {{colorClass}}" id="{{id}}" data-priority="{{priority}}">' +
'<div class="issue-header">'+
'<a class="assigns-myself">' +
'<span class="empty-avatar">+</span>' +
'<span class="empty-avatar-label">ASSIGN ME</span>' +
'<img class="assignee-avatar" title="{{assignee.login}}" src="{{assignee.avatar_url}}" />' +
'</a>' +
'<a href="{{html_url}}" target="_blank"><span class="issue-number right">#{{number}}</span></a>' +
'</div>' +
'<div class="issue-body">' +
'<a class="title list-group-item-heading" href="{{html_url}}" target="_blank" data-toggle="tooltip" title="{{body}}">' +
'{{title}}' +
'</a>'+
'</div>' +
'<div class="labels">'+
'{{#labelsName}}' +
'<span class="label" style="background: #{{color}};">{{name}}</span>' +
'{{/labelsName}}' +
'</div>' +
'</div>'
);
});
>>>>>>>
this.before('initialize', function () {
this.template = Hogan.compile(
'<div class="issue list-group-item {{repoName}} {{colorClass}}" id="{{id}}" data-priority="{{priority}}">' +
'<div class="issue-header">'+
'<a class="assigns-myself">' +
'<span class="empty-avatar">+</span>' +
'<span class="empty-avatar-label">ASSIGN ME</span>' +
'<img class="assignee-avatar" title="{{assignee.login}}" src="{{assignee.avatar_url}}" />' +
'</a>' +
'<a href="{{html_url}}" target="_blank"><span class="issue-number right">#{{number}}</span></a>' +
'</div>' +
'<div class="issue-body">' +
'<a class="title list-group-item-heading" href="{{html_url}}" target="_blank" data-toggle="tooltip" title="{{body}}" data-hint="Ctrl+C to Copy">' +
'{{title}}' +
'</a>'+
'</div>' +
'<div class="labels">'+
'{{#labelsName}}' +
'<span class="label" style="background: #{{color}};">{{name}}</span>' +
'{{/labelsName}}' +
'</div>' +
'</div>'
);
}); |
<<<<<<<
flowConfig: Remote.NotAsked,
isCoinify: false,
desiredTier: -1
=======
flowType: Remote.NotAsked,
steps: Remote.NotAsked
>>>>>>>
steps: Remote.NotAsked |
<<<<<<<
import renderFaq from 'components/FaqDropdown'
import { ColLeft, ColRight, PartnerHeader, PartnerSubHeader, ColRightInner } from 'components/IdentityVerification'
=======
import Helper from 'components/BuySell/FAQ'
import {
ColLeft,
ColRight,
PartnerHeader,
PartnerSubHeader,
ColRightInner
} from 'components/BuySell/Signup'
>>>>>>>
import renderFaq from 'components/FaqDropdown'
import {
ColLeft,
ColRight,
PartnerHeader,
PartnerSubHeader,
ColRightInner
} from 'components/IdentityVerification'
<<<<<<<
const BankLink = (props) => {
=======
const selectBankFaqHelper = () =>
selectBankFaqs.map((el, i) => (
<Helper key={i} question={el.question} answer={el.answer} />
))
const faqListHelper = () =>
faqList.map((el, i) => (
<Helper key={i} question={el.question} answer={el.answer} />
))
const BankLink = props => {
>>>>>>>
const BankLink = props => { |
<<<<<<<
export default reduxForm({
form: 'shapeshiftStateRegistration',
=======
export default injectIntl(reduxForm({
form: 'exchange',
>>>>>>>
export default injectIntl(reduxForm({
form: 'shapeshiftStateRegistration', |
<<<<<<<
import { path } from 'ramda'
// import Template from './template'
=======
>>>>>>>
import { path } from 'ramda'
// import Template from './template'
<<<<<<<
window.addEventListener('message', function (e) {
// console.log('V4 ISX_COMPONENT: addEventListener', e)
})
const onComplete = (e) => {
console.log('V4 ISX_COMPONENT: from onComplete', e)
// TODO dispatch action to go to next step --> order history and open modal for in review, rejected, processing, etc..
this.props.coinifyActions.fromISX(e)
}
var e = document.getElementById('isx-iframe')
const iSignThisDomain = path(['platforms', 'web', 'coinify', 'config', 'iSignThisDomain'], this.props.options)
// const iSignThisID = this.props.iSignThisId
=======
window.addEventListener('message', function (e) {})
const onComplete = () => {}
const iSignThisDomain = 'https://verify.isignthis.com'
// const e = document.getElementById('isx-iframe')
// const iSignThisID = '6ae7fdad-4f3b-406a-9a59-f12c135c7709'
>>>>>>>
window.addEventListener('message', function (e) {
// console.log('V4 ISX_COMPONENT: addEventListener', e)
})
const onComplete = (e) => {
console.log('V4 ISX_COMPONENT: from onComplete', e)
// TODO dispatch action to go to next step --> order history and open modal for in review, rejected, processing, etc..
this.props.coinifyActions.fromISX(e)
}
var e = document.getElementById('isx-iframe')
const iSignThisDomain = path(['platforms', 'web', 'coinify', 'config', 'iSignThisDomain'], this.props.options)
// const iSignThisID = this.props.iSignThisId
<<<<<<<
=======
>>>>>>>
<<<<<<<
this.iframe = e
=======
>>>>>>>
<<<<<<<
var eventMethod = window.addEventListener ? 'addEventListener' : 'attachEvent'
var eventer = window[eventMethod]
var messageEvent = eventMethod === 'attachEvent' ? 'onmessage' : 'message'
var self = this
console.log('V4 ISX_COMPONENT: eventer', eventer, messageEvent)
=======
let eventMethod = window.addEventListener ? 'addEventListener' : 'attachEvent'
let eventer = window[eventMethod]
let messageEvent = eventMethod === 'attachEvent' ? 'onmessage' : 'message'
let self = this
>>>>>>>
let eventMethod = window.addEventListener ? 'addEventListener' : 'attachEvent'
let eventer = window[eventMethod]
let messageEvent = eventMethod === 'attachEvent' ? 'onmessage' : 'message'
let self = this
<<<<<<<
// console.log('V4 ISX_COMPONENT: eventer called', e)
=======
>>>>>>>
<<<<<<<
} catch (err) {
console.log('V4 ISX_COMPONENT: err caught:', err)
}
=======
} catch (e) {}
>>>>>>>
} catch (err) {
console.log('V4 ISX_COMPONENT: err caught:', err)
}
<<<<<<<
var widget = {
transaction_id: this.props.iSignThisId,
=======
let widget = {
transaction_id: '6ae7fdad-4f3b-406a-9a59-f12c135c7709',
>>>>>>>
var widget = {
transaction_id: this.props.iSignThisId,
<<<<<<<
var setState = (state) => {
console.log('V4 ISX_COMPONENT: setState', state)
=======
let setState = (state) => {
>>>>>>>
var setState = (state) => {
console.log('V4 ISX_COMPONENT: setState', state)
<<<<<<<
console.log('V4 ISX_COMPONENT: completed. e=', JSON.stringify(e))
=======
>>>>>>>
console.log('V4 ISX_COMPONENT: completed. e=', JSON.stringify(e))
<<<<<<<
.fail(function (e) {
console.log('V4 ISX_COMPONENT: error. e=' + JSON.stringify(e))
})
.resized(function (e) {
console.log('V4 ISX_COMPONENT: resized. e=', JSON.stringify(e))
})
.route(function (e) {
console.log('V4 ISX_COMPONENT: route. e=' + JSON.stringify(e))
})
=======
.fail(function (e) {})
.resized(function (e) {})
.route(function (e) {})
>>>>>>>
.fail(function (e) {
console.log('V4 ISX_COMPONENT: error. e=' + JSON.stringify(e))
})
.resized(function (e) {
console.log('V4 ISX_COMPONENT: resized. e=', JSON.stringify(e))
})
.route(function (e) {
console.log('V4 ISX_COMPONENT: route. e=' + JSON.stringify(e))
})
<<<<<<<
=======
<h3>iSignThis step</h3>
>>>>>>>
<<<<<<<
const mapStateToProps = (state) => ({
walletOptions: path(['walletOptionsPath'], state)
=======
const mapStateToProps = () => ({
hello: 'world'
>>>>>>>
const mapStateToProps = (state) => ({
walletOptions: path(['walletOptionsPath'], state) |
<<<<<<<
<<<<<<< Updated upstream
min-width: ${props => props.coinify ? '135px' : '70px'};
max-width: ${props => props.coinify ? '135px' : '70px'};
=======
min-width: ${props => props.minWidth || '70px'};
max-width: ${props => props.maxWidth || '70px'};
>>>>>>> Stashed changes
=======
min-width: ${props => props.minWidth ? '135px' : '70px'};
max-width: ${props => props.maxWidth ? '135px' : '70px'};
>>>>>>>
min-width: ${props => props.minWidth || '70px'};
max-width: ${props => props.maxWidth || '70px'}; |
<<<<<<<
export const sellDescription = `Exchange Trade SFX-`
export default ({ coreSagas }) => {
const logLocation = 'modules/sfox/sagas'
=======
export const logLocation = 'modules/sfox/sagas'
>>>>>>>
export const sellDescription = `Exchange Trade SFX-`
export const logLocation = 'modules/sfox/sagas' |
<<<<<<<
const networkR = selectors.core.walletOptions.getBtcNetwork(state)
const network = networkR.getOrElse('bitcoin')
const verificationStatus = selectors.core.data.sfox.getVerificationStatus(
state
).data
=======
const verificationStatus = selectors.core.data.sfox
.getVerificationStatus(state)
.getOrElse(undefined)
>>>>>>>
const networkR = selectors.core.walletOptions.getBtcNetwork(state)
const network = networkR.getOrElse('bitcoin')
const verificationStatus = selectors.core.data.sfox
.getVerificationStatus(state)
.getOrElse(undefined) |
<<<<<<<
export {
bch,
btc,
eth,
lockbox,
root,
userCredentials,
xlm
}
=======
export {
root,
eth,
buySell,
contacts,
bch,
btc,
lockbox,
userCredentials,
walletCredentials,
xlm
}
>>>>>>>
export {
root,
eth,
bch,
btc,
lockbox,
userCredentials,
walletCredentials,
xlm
} |
<<<<<<<
export const reset2faError = (val) => ({ type: AT.RESET_2FA_ERROR, payload: { val } })
export const upgradeWallet = () => ({ type: AT.UPGRADE_WALLET, payload: {} })
export const setError = (message) => ({ type: AT.SET_AUTH_ERROR, payload: { message } })
export const clearError = () => ({ type: AT.CLEAR_ERROR })
=======
export const reset2faLoading = () => ({ type: AT.RESET_2FA_LOADING })
export const reset2faSuccess = () => ({ type: AT.RESET_2FA_SUCCESS })
export const reset2faFailure = (err) => ({ type: AT.RESET_2FA_FAILURE, payload: { err } })
export const upgradeWallet = () => ({ type: AT.UPGRADE_WALLET, payload: {} })
>>>>>>>
export const reset2faLoading = () => ({ type: AT.RESET_2FA_LOADING })
export const reset2faSuccess = () => ({ type: AT.RESET_2FA_SUCCESS })
export const reset2faFailure = (err) => ({ type: AT.RESET_2FA_FAILURE, payload: { err } })
export const upgradeWallet = () => ({ type: AT.UPGRADE_WALLET, payload: {} })
export const setError = (message) => ({ type: AT.SET_AUTH_ERROR, payload: { message } })
export const clearError = () => ({ type: AT.CLEAR_ERROR }) |
<<<<<<<
export const PasswordsDoNotMatch = () => <FormattedMessage id='formhelper.passwordsdonotmatch' defaultMessage='Passwords do not match' />
export const IncorrectPassword = () => <FormattedMessage id='formhelper.incorrectpassword' defaultMessage='Incorrect password' />
export const SamePasswordAsCurrent = () => <FormattedMessage id='formhelper.samepasswordascurrent' defaultMessage='Password is the same as current' />
=======
export const PartnerStateWhitelist = () => <FormattedMessage id='formhelper.partnerstatewhitelist' defaultMessage='State not available for buy & sell' />
>>>>>>>
export const PartnerStateWhitelist = () => <FormattedMessage id='formhelper.partnerstatewhitelist' defaultMessage='State not available for buy & sell' />
export const PasswordsDoNotMatch = () => <FormattedMessage id='formhelper.passwordsdonotmatch' defaultMessage='Passwords do not match' />
export const IncorrectPassword = () => <FormattedMessage id='formhelper.incorrectpassword' defaultMessage='Incorrect password' />
export const SamePasswordAsCurrent = () => <FormattedMessage id='formhelper.samepasswordascurrent' defaultMessage='Password is the same as current' /> |
<<<<<<<
return lift((level) => ({ level }))(level)
}
=======
const kycs = selectors.core.data.coinify.getKycs(state)
const canTrade = selectors.core.data.coinify.canTrade(state)
const cannotTradeReason = selectors.core.data.coinify.cannotTradeReason(state)
const profile = selectors.core.data.coinify.getProfile(state)
return lift((level, kycs, canTrade, cannotTradeReason, profile) => ({ level, kycs, canTrade, cannotTradeReason, profile }))(level, kycs, canTrade, cannotTradeReason, profile)
}
export const getTrades = (state) => {
try {
return selectors.core.data.coinify.getTrades(state).data
} catch (e) {
return null
}
}
export const getRateQuote = (state) => {
try {
return selectors.core.data.coinify.getRateQuote(state)
} catch (e) {
return null
}
}
export const getTrade = (state) => {
try {
return selectors.core.data.coinify.getTrade(state).data
} catch (e) {
return null
}
}
export const getQuote = (state) => {
try {
return selectors.core.data.coinify.getQuote(state)
} catch (e) {
return null
}
}
export const getCurrency = (state) => {
try {
return selectors.core.data.coinify.getLevel(state)
} catch (e) {
return null
}
}
export const getBase = (state) => {
return state.form.exchangeCheckout && state.form.exchangeCheckout.active
}
export const getErrors = (state) => {
const exchangeCheckoutForm = state.form && state.form.exchangeCheckout
return exchangeCheckoutForm && exchangeCheckoutForm.syncErrors
}
export const getData = (state) => ({
base: getBase(state),
data: getProfileData(state),
buyQuoteR: getQuote(state),
sellQuoteR: getQuote(state),
rateQuoteR: getRateQuote(state),
trades: getTrades(state),
trade: getTrade(state),
errors: getErrors(state),
currency: formValueSelector('coinifyCheckout')(state, 'currency'),
defaultCurrency: getCurrency(state),
checkoutBusy: path(['coinify', 'checkoutBusy'], state),
paymentMedium: path(['coinify', 'medium'], state),
step: path(['coinify', 'checkoutStep'], state),
coinifyBusy: path(['coinify', 'coinifyBusy'], state)
})
>>>>>>>
const kycs = selectors.core.data.coinify.getKycs(state)
const canTrade = selectors.core.data.coinify.canTrade(state)
const cannotTradeReason = selectors.core.data.coinify.cannotTradeReason(state)
const profile = selectors.core.data.coinify.getProfile(state)
return lift((level, kycs, canTrade, cannotTradeReason, profile) => ({ level, kycs, canTrade, cannotTradeReason, profile }))(level, kycs, canTrade, cannotTradeReason, profile)
} |
<<<<<<<
import { address, networks, ECPair } from 'bitcoinjs-lib'
import { equals, or } from 'ramda'
=======
import { selectAll } from '../coinSelection'
import { address, crypto, networks, ECPair } from 'bitcoinjs-lib'
import { equals, head, or, prop } from 'ramda'
>>>>>>>
import { selectAll } from '../coinSelection'
import { address, networks, ECPair } from 'bitcoinjs-lib'
import { equals, head, or, prop } from 'ramda'
<<<<<<<
}
export const isKey = function (bitcoinKey) {
return bitcoinKey instanceof ECPair
=======
}
export const calculateEffectiveBalanceSatoshis = (coins, feePerByte) => {
const { outputs } = selectAll(feePerByte, coins)
return prop('value', head(outputs)) || 0
}
export const calculateEffectiveBalanceBitcoin = (coins, feePerByte) => {
const effectiveBalanceSatoshis = calculateEffectiveBalanceSatoshis(coins, feePerByte)
return Exchange.convertBitcoinToBitcoin({ value: effectiveBalanceSatoshis, fromUnit: 'SAT', toUnit: 'BTC' }).value
>>>>>>>
}
export const isKey = function (bitcoinKey) {
return bitcoinKey instanceof ECPair
}
export const calculateEffectiveBalanceSatoshis = (coins, feePerByte) => {
const { outputs } = selectAll(feePerByte, coins)
return prop('value', head(outputs)) || 0
}
export const calculateEffectiveBalanceBitcoin = (coins, feePerByte) => {
const effectiveBalanceSatoshis = calculateEffectiveBalanceSatoshis(coins, feePerByte)
return Exchange.convertBitcoinToBitcoin({ value: effectiveBalanceSatoshis, fromUnit: 'SAT', toUnit: 'BTC' }).value |
<<<<<<<
* @param {boolean} [args.cors_anonymous=true] - `true` There will be no exchange of user credentials via cookies, client-side SSL certificates.
=======
* @param {object} [args.pano_size=null] - The panorama size, if cropped (unnecessary if XMP data can be read)
* @param {number} [args.pano_size.full_width=null] - The full panorama width, before crop (the image width if `null`)
* @param {number} [args.pano_size.full_height=null] - The full panorama height, before crop (the image height if `null`)
* @param {number} [args.pano_size.cropped_width=null] - The cropped panorama width (the image width if `null`)
* @param {number} [args.pano_size.cropped_height=null] - The cropped panorama height (the image height if `null`)
* @param {number} [args.pano_size.cropped_x=null] - The cropped panorama horizontal offset relative to the full width (middle if `null`)
* @param {number} [args.pano_size.cropped_y=null] - The cropped panorama vertical offset relative to the full height (middle if `null`)
>>>>>>>
* @param {boolean} [args.cors_anonymous=true] - `true` There will be no exchange of user credentials via cookies, client-side SSL certificates.
* @param {object} [args.pano_size=null] - The panorama size, if cropped (unnecessary if XMP data can be read)
* @param {number} [args.pano_size.full_width=null] - The full panorama width, before crop (the image width if `null`)
* @param {number} [args.pano_size.full_height=null] - The full panorama height, before crop (the image height if `null`)
* @param {number} [args.pano_size.cropped_width=null] - The cropped panorama width (the image width if `null`)
* @param {number} [args.pano_size.cropped_height=null] - The cropped panorama height (the image height if `null`)
* @param {number} [args.pano_size.cropped_x=null] - The cropped panorama horizontal offset relative to the full width (middle if `null`)
* @param {number} [args.pano_size.cropped_y=null] - The cropped panorama vertical offset relative to the full height (middle if `null`) |
<<<<<<<
import { prop, propOr, isEmpty } from 'ramda'
=======
import React from 'react'
import { FormattedMessage } from 'react-intl'
import { prop, propOr, path } from 'ramda'
>>>>>>>
import React from 'react'
import { FormattedMessage } from 'react-intl'
import { prop, propOr, path, isEmpty } from 'ramda'
<<<<<<<
[
selectors.components.sendEth.getPayment,
selectors.components.sendEth.getToToggled,
selectors.core.kvStore.lockbox.getDevices,
selectors.form.getFormValues('sendEth')
],
(paymentR, toToggled, lockboxDevicesR, formValues) => {
const enableToggle = !isEmpty(lockboxDevicesR.getOrElse({}))
=======
[
selectors.components.sendEth.getPayment,
selectors.components.sendEth.getFeeToggled,
selectors.core.data.ethereum.getLegacyBalance
],
(paymentR, feeToggled, balanceR) => {
>>>>>>>
[
selectors.components.sendEth.getPayment,
selectors.components.sendEth.getToToggled,
selectors.components.sendEth.getFeeToggled,
selectors.core.data.ethereum.getLegacyBalance,
selectors.core.kvStore.lockbox.getDevices,
selectors.form.getFormValues('sendEth')
],
(paymentR, toToggled, feeToggled, balanceR, lockboxDevicesR, formValues) => {
const enableToggle = !isEmpty(lockboxDevicesR.getOrElse({}))
<<<<<<<
const destination = prop('to', formValues)
=======
const regularFee = path(['fees', 'regular'], payment)
const priorityFee = path(['fees', 'priority'], payment)
const minFee = path(['fees', 'limits', 'min'], payment)
const maxFee = path(['fees', 'limits', 'max'], payment)
const feeElements = [
{
group: '',
items: [
{
text: (
<FormattedMessage
id='modals.sendeth.firststep.fee.regular'
defaultMessage='Regular'
/>
),
value: regularFee
},
{
text: (
<FormattedMessage
id='modals.sendeth.firststep.fee.priority'
defaultMessage='Priority'
/>
),
value: priorityFee
}
]
}
]
>>>>>>>
const destination = prop('to', formValues)
const regularFee = path(['fees', 'regular'], payment)
const priorityFee = path(['fees', 'priority'], payment)
const minFee = path(['fees', 'limits', 'min'], payment)
const maxFee = path(['fees', 'limits', 'max'], payment)
const feeElements = [
{
group: '',
items: [
{
text: (
<FormattedMessage
id='modals.sendeth.firststep.fee.regular'
defaultMessage='Regular'
/>
),
value: regularFee
},
{
text: (
<FormattedMessage
id='modals.sendeth.firststep.fee.priority'
defaultMessage='Priority'
/>
),
value: priorityFee
}
]
}
]
<<<<<<<
toToggled,
enableToggle,
destination,
fee
=======
fee,
feeToggled,
regularFee,
priorityFee,
minFee,
maxFee,
feeElements,
balanceStatus: balanceR
>>>>>>>
fee,
toToggled,
feeToggled,
enableToggle,
destination,
regularFee,
priorityFee,
minFee,
maxFee,
feeElements,
balanceStatus: balanceR |
<<<<<<<
import PhoneNumberBox from './PhoneNumberBox'
import SelectBox from './SelectBox'
=======
>>>>>>>
import PhoneNumberBox from './PhoneNumberBox'
<<<<<<<
export { CaptchaBox, CheckBox, CoinConvertor, Form, Hidden, NumberBox, PasswordBox, PhoneNumberBox, SelectBox, SelectBoxAddresses, TextArea, TextBox }
=======
export {
CaptchaBox,
CheckBox,
CoinConvertor,
Form,
Hidden,
NumberBox,
PasswordBox,
SelectBoxAddresses,
SelectBoxBitcoinUnit,
SelectBoxCurrency,
SelectBoxLanguages,
TextArea,
TextBox
}
>>>>>>>
export {
CaptchaBox,
CheckBox,
CoinConvertor,
Form,
Hidden,
NumberBox,
PasswordBox,
PhoneNumberBox,
SelectBoxAddresses,
SelectBoxBitcoinUnit,
SelectBoxCurrency,
SelectBoxLanguages,
TextArea,
TextBox
} |
<<<<<<<
import chartsReducer from './Charts/reducers.js'
import logReducer from './Log/reducers.js'
=======
>>>>>>>
import chartsReducer from './Charts/reducers.js'
<<<<<<<
charts: chartsReducer,
log: logReducer,
=======
>>>>>>>
charts: chartsReducer, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.