-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ETH and ERC20 balance/transaction/address support (with BAT/DAI/ETH)
- Loading branch information
1 parent
29d184a
commit 2955261
Showing
86 changed files
with
1,142 additions
and
399 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"APP_VERSION": "0.1.9-beta", | ||
"VERUS_QR_VERSION": "0.1.1", | ||
"CHAIN_QR_VERSION": "0.1.0", | ||
"ELECTRUM_PROTOCOL_CHANGE": 1.4, | ||
|
||
"REQUEST_TIMEOUT_MS": 10000, | ||
|
||
"BLOCK_HEADER_STORE_CAP": 20, | ||
"MIN_HEADER_CACHE_CONFS": 100, | ||
|
||
"ENABLE_FIAT_GATEWAY": false, | ||
"ENABLE_VERUS_IDENTITIES": false, | ||
"DISABLED_CHANNELS": ["dlight"], | ||
"ENABLE_DLIGHT": false, | ||
"ENABLE_ERC20": true, | ||
"ENABLE_ETH": true, | ||
"ENABLE_ELECTRUM": true, | ||
"ENABLE_GENERAL": true, | ||
|
||
"ETH_NETWORK": "ropsten", | ||
|
||
"ETHERSCAN_API_KEY": "PUT_KEY_HERE", | ||
"INFURA_PROJECT_ID": "PUT_ID_HERE" | ||
} |
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,19 +1,23 @@ | ||
// Versions | ||
global.APP_VERSION = "0.1.9-beta"; | ||
global.VERUS_QR_VERSION = "0.1.1"; | ||
global.CHAIN_QR_VERSION = "0.1.0" | ||
global.ELECTRUM_PROTOCOL_CHANGE = 1.4; | ||
//TODO: Test with Jest and delete | ||
|
||
// HTTPS | ||
global.REQUEST_TIMEOUT_MS = 10000; | ||
// // Versions | ||
// global.APP_VERSION = "0.1.9-beta"; | ||
// global.VERUS_QR_VERSION = "0.1.1"; | ||
// global.CHAIN_QR_VERSION = "0.1.0" | ||
// global.ELECTRUM_PROTOCOL_CHANGE = 1.4; | ||
|
||
// Cache globals (more in cache files because globals cant be used for | ||
// constants that are needed immediately on app load) | ||
global.BLOCK_HEADER_STORE_CAP = 20; | ||
global.MIN_HEADER_CACHE_CONFS = 100; | ||
// // HTTPS | ||
// global.REQUEST_TIMEOUT_MS = 10000; | ||
|
||
// App functionality | ||
global.ENABLE_FIAT_GATEWAY = false; | ||
global.ENABLE_VERUS_IDENTITIES = false; | ||
global.ENABLE_DLIGHT = false; | ||
// // Cache globals (more in cache files because globals cant be used for | ||
// // constants that are needed immediately on app load) | ||
// global.BLOCK_HEADER_STORE_CAP = 20; | ||
// global.MIN_HEADER_CACHE_CONFS = 100; | ||
|
||
// // App functionality | ||
// global.ENABLE_FIAT_GATEWAY = false; | ||
// global.ENABLE_VERUS_IDENTITIES = false; | ||
// global.DISABLED_CHANNELS = ['dlight']; | ||
// global.ENABLE_DLIGHT = !global.DISABLED_CHANNELS.includes('dlight') | ||
// global.ENABLE_ERC20 = !global.DISABLED_CHANNELS.includes('erc20') | ||
|
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
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
File renamed without changes.
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
23 changes: 23 additions & 0 deletions
23
src/actions/actions/channels/electrum/dispatchers/ElectrumWalletReduxManager.js
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,23 @@ | ||
import Store from '../../../../../store/index' | ||
import { | ||
INIT_ELECTRUM_CHANNEL_START, | ||
CLOSE_ELECTRUM_CHANNEL, | ||
} from "../../../../../utils/constants/storeType"; | ||
|
||
export const initElectrumWallet = async (coinObj) => { | ||
Store.dispatch({ | ||
type: INIT_ELECTRUM_CHANNEL_START, | ||
payload: { chainTicker: coinObj.id } | ||
}) | ||
|
||
return | ||
} | ||
|
||
export const closeElectrumWallet = async (coinObj) => { | ||
Store.dispatch({ | ||
type: CLOSE_ELECTRUM_CHANNEL, | ||
payload: { chainTicker: coinObj.id } | ||
}) | ||
|
||
return | ||
} |
23 changes: 23 additions & 0 deletions
23
src/actions/actions/channels/erc20/dispatchers/Erc20WalletReduxManager.js
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,23 @@ | ||
import Store from '../../../../../store/index' | ||
import { | ||
INIT_ERC20_CHANNEL_START, | ||
CLOSE_ERC20_CHANNEL, | ||
} from "../../../../../utils/constants/storeType"; | ||
|
||
export const initErc20Wallet = async (coinObj) => { | ||
Store.dispatch({ | ||
type: INIT_ERC20_CHANNEL_START, | ||
payload: { chainTicker: coinObj.id, contractAddress: coinObj.contract_address } | ||
}) | ||
|
||
return | ||
} | ||
|
||
export const closeErc20Wallet = async (coinObj) => { | ||
Store.dispatch({ | ||
type: CLOSE_ERC20_CHANNEL, | ||
payload: { chainTicker: coinObj.id, contractAddress: coinObj.contract_address } | ||
}) | ||
|
||
return | ||
} |
23 changes: 23 additions & 0 deletions
23
src/actions/actions/channels/eth/dispatchers/EthWalletReduxManager.js
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,23 @@ | ||
import Store from '../../../../../store/index' | ||
import { | ||
INIT_ETH_CHANNEL_START, | ||
CLOSE_ETH_CHANNEL, | ||
} from "../../../../../utils/constants/storeType"; | ||
|
||
export const initEthWallet = async (coinObj) => { | ||
Store.dispatch({ | ||
type: INIT_ETH_CHANNEL_START, | ||
payload: { chainTicker: coinObj.id } | ||
}) | ||
|
||
return | ||
} | ||
|
||
export const closeEthWallet = async (coinObj) => { | ||
Store.dispatch({ | ||
type: CLOSE_ETH_CHANNEL, | ||
payload: { chainTicker: coinObj.id } | ||
}) | ||
|
||
return | ||
} |
Oops, something went wrong.