aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2018-10-13 13:27:14 +0800
committerHsuan Lee <hsuan@cobinhood.com>2018-12-10 18:16:38 +0800
commit764cd4533c55620e35a2ff57ef447f7b9955620b (patch)
tree62deb7a73afb46b62fecdce7c17ab7c949a71d9f /test/unit
parent7896e5f5c25add295ce4d9f7d97adc3ee69df48c (diff)
downloaddexon-wallet-764cd4533c55620e35a2ff57ef447f7b9955620b.tar.gz
dexon-wallet-764cd4533c55620e35a2ff57ef447f7b9955620b.tar.zst
dexon-wallet-764cd4533c55620e35a2ff57ef447f7b9955620b.zip
Complete onboarding flow
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/app/controllers/infura-controller-test.js6
-rw-r--r--test/unit/app/controllers/metamask-controller-test.js14
-rw-r--r--test/unit/app/controllers/network-contoller-test.js4
-rw-r--r--test/unit/app/controllers/transactions/tx-controller-test.js2
-rw-r--r--test/unit/development/sample-changelog.md36
-rw-r--r--test/unit/development/sample-manifest.json4
6 files changed, 33 insertions, 33 deletions
diff --git a/test/unit/app/controllers/infura-controller-test.js b/test/unit/app/controllers/infura-controller-test.js
index 7bd95dd4..7fa82148 100644
--- a/test/unit/app/controllers/infura-controller-test.js
+++ b/test/unit/app/controllers/infura-controller-test.js
@@ -49,12 +49,12 @@ describe('infura-controller', function () {
})
})
- describe('Rinkeby', function () {
- it('should have Rinkeby', function () {
+ describe('DEXON', function () {
+ it('should have DEXON', function () {
assert.equal(Object.keys(networkStatus)[3], 'rinkeby')
})
- it('should have a value for Rinkeby status', function () {
+ it('should have a value for DEXON status', function () {
assert.equal(networkStatus.rinkeby, 'down')
})
})
diff --git a/test/unit/app/controllers/metamask-controller-test.js b/test/unit/app/controllers/metamask-controller-test.js
index 1ed6a95f..7532abdb 100644
--- a/test/unit/app/controllers/metamask-controller-test.js
+++ b/test/unit/app/controllers/metamask-controller-test.js
@@ -4,7 +4,7 @@ const clone = require('clone')
const nock = require('nock')
const createThoughStream = require('through2').obj
const blacklistJSON = require('eth-phishing-detect/src/config')
-const MetaMaskController = require('../../../../app/scripts/metamask-controller')
+const DekuSanController = require('../../../../app/scripts/metamask-controller')
const firstTimeState = require('../../../unit/localhostState')
const createTxMeta = require('../../../lib/createTxMeta')
const EthQuery = require('eth-query')
@@ -20,7 +20,7 @@ const TEST_SEED_ALT = 'setup olympic issue mobile velvet surge alcohol burger ho
const TEST_ADDRESS_ALT = '0xc42edfcc21ed14dda456aa0756c153f7985d8813'
const CUSTOM_RPC_URL = 'http://localhost:8545'
-describe('MetaMaskController', function () {
+describe('DekuSanController', function () {
let metamaskController
const sandbox = sinon.createSandbox()
const noop = () => {}
@@ -45,7 +45,7 @@ describe('MetaMaskController', function () {
.get(/.*/)
.reply(200)
- metamaskController = new MetaMaskController({
+ metamaskController = new DekuSanController({
showUnapprovedTx: noop,
showUnconfirmedMessage: noop,
encryptor: {
@@ -438,14 +438,14 @@ describe('MetaMaskController', function () {
})
describe('#setCurrentCurrency', function () {
- let defaultMetaMaskCurrency
+ let defaultDekuSanCurrency
beforeEach(function () {
- defaultMetaMaskCurrency = metamaskController.currencyController.getCurrentCurrency()
+ defaultDekuSanCurrency = metamaskController.currencyController.getCurrentCurrency()
})
it('defaults to usd', function () {
- assert.equal(defaultMetaMaskCurrency, 'usd')
+ assert.equal(defaultDekuSanCurrency, 'usd')
})
it('sets currency to JPY', function () {
@@ -683,7 +683,7 @@ describe('MetaMaskController', function () {
await metamaskController.newUnsignedPersonalMessage(msgParams)
assert.fail('should have thrown')
} catch (error) {
- assert.equal(error.message, 'MetaMask Message Signature: from field is required.')
+ assert.equal(error.message, 'DekuSan Message Signature: from field is required.')
}
})
diff --git a/test/unit/app/controllers/network-contoller-test.js b/test/unit/app/controllers/network-contoller-test.js
index 7959e6cc..02813f44 100644
--- a/test/unit/app/controllers/network-contoller-test.js
+++ b/test/unit/app/controllers/network-contoller-test.js
@@ -76,7 +76,7 @@ describe('Network utils', () => {
expected: 'Ropsten',
}, {
input: 4,
- expected: 'Rinkeby',
+ expected: 'DEXON',
}, {
input: 42,
expected: 'Kovan',
@@ -85,7 +85,7 @@ describe('Network utils', () => {
expected: 'Ropsten',
}, {
input: 'rinkeby',
- expected: 'Rinkeby',
+ expected: 'DEXON',
}, {
input: 'kovan',
expected: 'Kovan',
diff --git a/test/unit/app/controllers/transactions/tx-controller-test.js b/test/unit/app/controllers/transactions/tx-controller-test.js
index 74161e26..2cf0a26c 100644
--- a/test/unit/app/controllers/transactions/tx-controller-test.js
+++ b/test/unit/app/controllers/transactions/tx-controller-test.js
@@ -155,7 +155,7 @@ describe('Transaction Controller', function () {
txController.newUnapprovedTransaction(txParams)
.catch((err) => {
- if (err.message === 'MetaMask Tx Signature: User denied transaction signature.') done()
+ if (err.message === 'DekuSan Tx Signature: User denied transaction signature.') done()
else done(err)
})
})
diff --git a/test/unit/development/sample-changelog.md b/test/unit/development/sample-changelog.md
index 69f6513e..0e49b0cd 100644
--- a/test/unit/development/sample-changelog.md
+++ b/test/unit/development/sample-changelog.md
@@ -4,7 +4,7 @@
## 4.1.3 2018-2-28
-- Ensure MetaMask's inpage provider is named MetamaskInpageProvider to keep some sites from breaking.
+- Ensure DekuSan's inpage provider is named MetamaskInpageProvider to keep some sites from breaking.
- Add retry transaction button back into classic ui.
## 4.1.2 2018-2-28
@@ -27,13 +27,13 @@
## 4.0.0 2018-2-22
-- Introduce new MetaMask user interface.
+- Introduce new DekuSan user interface.
## 3.14.2 2018-2-15
- Fix bug where log subscriptions would break when switching network.
- Fix bug where storage values were cached across blocks.
-- Add MetaMask light client [testing container](https://github.com/MetaMask/mesh-testing)
+- Add DekuSan light client [testing container](https://github.com/DekuSan/mesh-testing)
## 3.14.1 2018-2-1
@@ -114,7 +114,7 @@
## 3.11.2 2017-10-21
- Fix bug where reject button would sometimes not work.
-- Fixed bug where sometimes MetaMask's connection to a page would be unreliable.
+- Fixed bug where sometimes DekuSan's connection to a page would be unreliable.
## 3.11.1 2017-10-20
@@ -200,7 +200,7 @@ rollback to 3.10.0 due to bug
- Make eth_sign deprecation warning less noisy
- Add useful link to eth_sign deprecation warning.
- Fix bug with network version serialization over synchronous RPC
-- Add MetaMask version to state logs.
+- Add DekuSan version to state logs.
- Add the total amount of tokens when multiple tokens are added under the token list
- Use HTTPS links for Etherscan.
- Update Support center link to new one with HTTPS.
@@ -387,7 +387,7 @@ rollback to 3.10.0 due to bug
## 3.6.3 2017-5-8
-- Fix bug that could stop newer versions of Geth from working with MetaMask.
+- Fix bug that could stop newer versions of Geth from working with DekuSan.
## 3.6.2 2017-5-8
@@ -404,7 +404,7 @@ rollback to 3.10.0 due to bug
## 3.6.0 2017-4-26
-- Add Rinkeby Test Network to our network list.
+- Add DEXON Test Network to our network list.
## 3.5.4 2017-4-25
@@ -542,7 +542,7 @@ rollback to 3.10.0 due to bug
## 2.13.9 2016-11-21
- Add support for the new, default Ropsten Test Network.
-- Fix bug that would cause MetaMask to occasionally lose its StreamProvider connection and drop requests.
+- Fix bug that would cause DekuSan to occasionally lose its StreamProvider connection and drop requests.
- Fix bug that would cause the Custom RPC menu item to not appear when Localhost 8545 was selected.
- Point ropsten faucet button to actual faucet.
- Phase out ethereumjs-util from our encryptor module.
@@ -593,8 +593,8 @@ rollback to 3.10.0 due to bug
## 2.13.2 2016-10-4
- Fix bug where chosen FIAT exchange rate does no persist when switching networks
-- Fix additional parameters that made MetaMask sometimes receive errors from Parity.
-- Fix bug where invalid transactions would still open the MetaMask popup.
+- Fix additional parameters that made DekuSan sometimes receive errors from Parity.
+- Fix bug where invalid transactions would still open the DekuSan popup.
- Removed hex prefix from private key export, to increase compatibility with Geth, MyEtherWallet, and Jaxx.
## 2.13.1 2016-09-23
@@ -611,14 +611,14 @@ too help visualize transactions and to where they are going.
## 2.12.1 2016-09-14
-- Fixed bug where if you send a transaction from within MetaMask extension the
+- Fixed bug where if you send a transaction from within DekuSan extension the
popup notification opens up.
- Fixed bug where some tx errors would block subsequent txs until the plugin was refreshed.
## 2.12.0 2016-09-14
- Add a QR button to the Account detail screen
-- Fixed bug where opening MetaMask could close a non-metamask popup.
+- Fixed bug where opening DekuSan could close a non-metamask popup.
- Fixed memory leak that caused occasional crashes.
## 2.11.1 2016-09-12
@@ -629,10 +629,10 @@ popup notification opens up.
- Fix bug where pending transactions from Test net (or other networks) show up In Main net.
- Add fiat conversion values to more views.
-- On fresh install, open a new tab with the MetaMask Introduction video. Does not open on update.
+- On fresh install, open a new tab with the DekuSan Introduction video. Does not open on update.
- Block negative values from transactions.
- Fixed a memory leak.
-- MetaMask logo now renders as super lightweight SVG, improving compatibility and performance.
+- DekuSan logo now renders as super lightweight SVG, improving compatibility and performance.
- Now showing loading indication during vault unlocking, to clarify behavior for users who are experiencing slow unlocks.
- Now only initially creates one wallet when restoring a vault, to reduce some users' confusion.
@@ -643,7 +643,7 @@ popup notification opens up.
## 2.10.1 2016-09-02
- Fix bug where provider menu did not allow switching to custom network from a custom network.
-- Sending a transaction from within MetaMask no longer triggers a popup.
+- Sending a transaction from within DekuSan no longer triggers a popup.
- The ability to build without livereload features (such as for production) can be enabled with the gulp --disableLiveReload flag.
- Fix Ethereum JSON RPC Filters bug.
@@ -664,7 +664,7 @@ popup notification opens up.
- Transaction history now has a hard limit.
- Added info link on account screen that visits Etherscan.
- Fixed bug where a message signing request would be lost if the vault was locked.
-- Added shortcut to open MetaMask (Ctrl+Alt+M or Cmd+Opt/Alt+M)
+- Added shortcut to open DekuSan (Ctrl+Alt+M or Cmd+Opt/Alt+M)
- Prevent API calls in tests.
- Fixed bug where sign message confirmation would sometimes render blank.
@@ -703,7 +703,7 @@ popup notification opens up.
- Added a Warning screen about storing ETH
- Add buy Button!
-- MetaMask now throws descriptive errors when apps try to use synchronous web3 methods.
+- DekuSan now throws descriptive errors when apps try to use synchronous web3 methods.
- Removed firefox-specific line in manifest.
## 2.6.2 2016-07-20
@@ -743,7 +743,7 @@ popup notification opens up.
## 2.4.5 2016-06-29
-- Fixed bug where MetaMask interfered with PDF loading.
+- Fixed bug where DekuSan interfered with PDF loading.
- Moved switch account icon into menu bar.
- Changed status shapes to be a yellow warning sign for failure and ellipsis for pending transactions.
- Now enforce 20 character limit on wallet names.
diff --git a/test/unit/development/sample-manifest.json b/test/unit/development/sample-manifest.json
index 2b3acf1b..c9316e5a 100644
--- a/test/unit/development/sample-manifest.json
+++ b/test/unit/development/sample-manifest.json
@@ -1,5 +1,5 @@
{
- "name": "MetaMask",
+ "name": "DekuSan",
"short_name": "Metamask",
"version": "4.1.3",
"manifest_version": 2,
@@ -37,7 +37,7 @@
"19": "images/icon-19.png",
"38": "images/icon-38.png"
},
- "default_title": "MetaMask",
+ "default_title": "DekuSan",
"default_popup": "popup.html"
},
"content_scripts": [