-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
134 changed files
with
26,561 additions
and
4,098 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ | |
.env.test.local | ||
.env.production.local | ||
|
||
package-lock.json | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,23 @@ | ||
const hotLoader = require('react-app-rewire-hot-loader'); | ||
const rewireSass = require('react-app-rewire-scss'); | ||
const webpack = require('webpack'); | ||
const {paths} = require('react-app-rewired'); | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
webpack: function (config, env) { | ||
// workaround for es6 node_modules minify errors | ||
config.module.rules[1].oneOf[1].include = [ | ||
paths.appSrc, | ||
path.resolve(paths.appNodeModules, 'bitcoinjs-lib'), | ||
path.resolve(paths.appNodeModules, 'ow'), | ||
path.resolve(paths.appNodeModules, 'create-xpub'), | ||
path.resolve(paths.appNodeModules, 'build-output-script'), | ||
path.resolve(paths.appNodeModules, 'get-komodo-rewards'), | ||
path.resolve(paths.appNodeModules, 'tiny-secp256k1'), | ||
path.resolve(paths.appNodeModules, 'bip32'), | ||
path.resolve(paths.appNodeModules, 'typeforce'), | ||
path.resolve(paths.appNodeModules, 'semver'), | ||
path.resolve(paths.appNodeModules, 'lru-cache'), | ||
path.resolve(paths.appNodeModules, 'yallist'), | ||
path.resolve(paths.appNodeModules, 'u2f-api'), | ||
path.resolve(paths.appNodeModules, 'asn1.js'), | ||
path.resolve(paths.appNodeModules, 'bech32'), | ||
path.resolve(paths.appNodeModules, 'webrtc-adapter'), | ||
path.resolve(paths.appNodeModules, '@trezor/utxo-lib'), | ||
path.resolve(paths.appNodeModules, '@ledgerhq/hw-app-btc'), | ||
path.resolve(paths.appNodeModules, '@ledgerhq/hw-transport/lib-es'), | ||
path.resolve(paths.appNodeModules, '@ledgerhq/hw-transport-webusb/lib-es'), | ||
path.resolve(paths.appNodeModules, '@ledgerhq/hw-transport-u2f/lib-es'), | ||
path.resolve(paths.appNodeModules, '@ledgerhq/hw-transport-webhid/lib-es'), | ||
]; | ||
module.exports = function override(config) { | ||
config.ignoreWarnings = [/Failed to parse source map/]; | ||
|
||
const fallback = config.resolve.fallback || {}; | ||
Object.assign(fallback, { | ||
'crypto': require.resolve('crypto-browserify'), | ||
'buffer': require.resolve('buffer'), | ||
'stream': require.resolve('stream-browserify'), | ||
}) | ||
config.resolve.fallback = fallback; | ||
config.plugins = (config.plugins || []).concat([ | ||
new webpack.ProvidePlugin({ | ||
process: 'process/browser', | ||
Buffer: ['buffer', 'Buffer'] | ||
}) | ||
]); | ||
|
||
config = hotLoader(config, env); | ||
config = rewireSass(config, env); | ||
|
||
return config; | ||
} | ||
return config; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
const {createAdapter} = require('iocane'); | ||
let pw; | ||
|
||
const decodeStoredData = (str/*, pw*/) => { | ||
return new Promise((resolve, reject) => { | ||
if (str.length) { | ||
createAdapter() | ||
.decrypt(str, pw) | ||
.catch((err) => { | ||
console.log('decodeStoredData error', err); | ||
resolve(false); | ||
}) | ||
.then(decryptedString => { | ||
//console.log('decryptedString', decryptedString); | ||
resolve(decryptedString); | ||
}); | ||
} else { | ||
resolve(false); | ||
} | ||
}); | ||
}; | ||
|
||
const encodeStoredData = (str/*, pw*/) => { | ||
return new Promise((resolve, reject) => { | ||
createAdapter() | ||
.encrypt(str, pw) | ||
.catch((err) => { | ||
console.log('encodeStoredData error', err); | ||
resolve(false); | ||
}) | ||
.then(encryptedString => { | ||
resolve(encryptedString); | ||
}); | ||
}); | ||
}; | ||
|
||
const getPW = () => { | ||
return pw; | ||
}; | ||
const setPW = (_pw) => { | ||
pw = _pw; | ||
}; | ||
|
||
module.exports = { | ||
decodeStoredData, | ||
encodeStoredData, | ||
getPW, | ||
setPW, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const static = [ // if static | ||
{ role: 'copy' }, | ||
{ type: 'separator' }, | ||
{ role: 'selectall' }, | ||
]; | ||
|
||
const edit = [ // if editable | ||
{ role: 'undo' }, | ||
{ role: 'redo' }, | ||
{ type: 'separator' }, | ||
{ role: 'cut' }, | ||
{ role: 'copy' }, | ||
{ role: 'paste' }, | ||
{ type: 'separator' }, | ||
{ role: 'selectall' }, | ||
]; | ||
|
||
module.exports = { | ||
static, | ||
edit, | ||
}; |
Oops, something went wrong.