Skip to content

Commit

Permalink
DEXW-2465: fix json parse
Browse files Browse the repository at this point in the history
  • Loading branch information
dtsigelnitskiy committed Nov 25, 2019
1 parent 40aed09 commit 785b29f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts-scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ export async function getInitScript(
isInstance: (data) => BigNumber.isBigNumber(data)
}).stringify;

var reg = new RegExp(`(?!\\\\)"(\\w+)":\\s*(\\d{14,})`, 'g');
var reg = new RegExp('((?!\\\\)"\\w+"):\\s*(-?[\\d|\\.]{14,})', 'g');

WavesApp.parseJSON = function (json) {
return JSON.parse(json.replace(reg, `"$1":"$2"`));
return JSON.parse(json.replace(reg, `$1:"$2"`));
};

WavesApp.stringifyJSON = function () {
Expand Down

0 comments on commit 785b29f

Please sign in to comment.