Remove unneeded 0 constant (#113)

This commit is contained in:
Jaco Greeff
2018-04-11 10:55:19 +02:00
committed by GitHub
parent 6c9885858a
commit 985ea40b45
4 changed files with 9 additions and 20 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
"test": "jest --coverage"
},
"devDependencies": {
"@polkadot/dev": "^0.17.2",
"@polkadot/dev": "^0.17.4",
"lerna": "^2.5.1"
}
}
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
const ZEROS_256 = '0000000000000000000000000000000000000000000000000000000000000000';
module.exports = {
ZEROS_256
};
+1 -2
View File
@@ -5,7 +5,6 @@
const hexAddPrefix = require('./addPrefix');
const hexStripPrefix = require('./stripPrefix');
const { ZEROS_256 } = require('./constants');
/**
@name hexFixLength
@@ -37,6 +36,6 @@ module.exports = function hexFixLength (value: string, bitLength: number = -1, w
}
return hexAddPrefix(
`${ZEROS_256}${hexStripPrefix(value)}`.slice(-1 * strLength)
`${'0'.repeat(strLength)}${hexStripPrefix(value)}`.slice(-1 * strLength)
);
};
+7 -7
View File
@@ -85,9 +85,9 @@
dependencies:
babel-runtime "^6.26.0"
"@polkadot/dev@^0.17.2":
version "0.17.2"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.17.2.tgz#1009c81f9db1548774361aa23631b4bdf8b7ede9"
"@polkadot/dev@^0.17.4":
version "0.17.4"
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.17.4.tgz#d5bcbbb0a6531ebbce222d946be9ae4a52eea1e4"
dependencies:
babel-cli "^6.26.0"
babel-core "^6.26.0"
@@ -112,7 +112,7 @@
eslint-plugin-promise "^3.6.0"
eslint-plugin-react "^7.7.0"
eslint-plugin-standard "^3.0.1"
flow-bin "^0.68.0"
flow-bin "^0.69.0"
flow-copy-source "^1.3.0"
jest "^22.4.2"
makeshift "^1.1.0"
@@ -2360,9 +2360,9 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"
flow-bin@^0.68.0:
version "0.68.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.68.0.tgz#86c2d14857d306eb2e85e274f2eebf543564f623"
flow-bin@^0.69.0:
version "0.69.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.69.0.tgz#053159a684a6051fcbf0b71a2eb19a9679082da6"
flow-copy-source@^1.3.0:
version "1.3.0"