-
-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wallet Decrypt - Web3 (MetaMask / Mist) (#303)
* add support for web3, disabled, and hidden in node dropdown header * add web3 node config actions * add web3 wallet actions * add web3 node support * add web3 wallet & web3 wallet ui selection * add web3 wallet & config sagas * add web3 transaction support to SendTransaction tab * add web3 node check & reset to redux store * remove comments from Web3.tsx * update comment * correct spacing display issue in Web3 component * convert getTransactionCount response to string * disable web3 wallets in offline mode * implement sendCallRequest method on Web3 node * remove unused vars * make typescript happy * convert wallet constants to enum & apply to wallet action files * update wallet reducer to use TypeKeys enum * remove unnecessary console log * remove unnecessary await * make token balance math more readable * use NewTabLink in Web3.tsx, allow NewTabLink to accept className * move web3.ts to non-deterministic folder * update imports & method names, implement message signing * add web3 wallet export * use bufferToHex
- Loading branch information
Showing
24 changed files
with
775 additions
and
179 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
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,10 +1,13 @@ | ||
export const WALLET_UNLOCK_PRIVATE_KEY = 'WALLET_UNLOCK_PRIVATE_KEY'; | ||
export const WALLET_UNLOCK_KEYSTORE = 'WALLET_UNLOCK_KEYSTORE'; | ||
export const WALLET_UNLOCK_MNEMONIC = 'WALLET_UNLOCK_MNEMONIC'; | ||
export const WALLET_SET = 'WALLET_SET'; | ||
export const WALLET_SET_BALANCE = 'WALLET_SET_BALANCE'; | ||
export const WALLET_SET_TOKEN_BALANCES = 'WALLET_SET_TOKEN_BALANCES'; | ||
export const WALLET_BROADCAST_TX_REQUESTED = 'WALLET_BROADCAST_TX_REQUESTED'; | ||
export const WALLET_BROADCAST_TX_FAILED = 'WALLET_BROADCAST_TX_FAILED'; | ||
export const WALLET_BROADCAST_TX_SUCCEEDED = 'WALLET_BROADCAST_TX_SUCCEEDED'; | ||
export const WALLET_RESET = 'WALLET_RESET'; | ||
export enum TypeKeys { | ||
WALLET_UNLOCK_PRIVATE_KEY = 'WALLET_UNLOCK_PRIVATE_KEY', | ||
WALLET_UNLOCK_KEYSTORE = 'WALLET_UNLOCK_KEYSTORE', | ||
WALLET_UNLOCK_MNEMONIC = 'WALLET_UNLOCK_MNEMONIC', | ||
WALLET_UNLOCK_WEB3 = 'WALLET_UNLOCK_WEB3', | ||
WALLET_SET = 'WALLET_SET', | ||
WALLET_SET_BALANCE = 'WALLET_SET_BALANCE', | ||
WALLET_SET_TOKEN_BALANCES = 'WALLET_SET_TOKEN_BALANCES', | ||
WALLET_BROADCAST_TX_REQUESTED = 'WALLET_BROADCAST_TX_REQUESTED', | ||
WALLET_BROADCAST_TX_FAILED = 'WALLET_BROADCAST_TX_FAILED', | ||
WALLET_BROADCAST_TX_SUCCEEDED = 'WALLET_BROADCAST_TX_SUCCEEDED', | ||
WALLET_RESET = 'WALLET_RESET' | ||
} |
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,26 @@ | ||
.Web3Decrypt { | ||
text-align: center; | ||
padding-top: 30px; | ||
|
||
&-decrypt { | ||
width: 100%; | ||
} | ||
|
||
&-help { | ||
margin-top: 10px; | ||
font-size: 13px; | ||
} | ||
|
||
&-error { | ||
opacity: 0; | ||
transition: none; | ||
|
||
&.is-showing { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
&-install { | ||
margin-top: 10px; | ||
} | ||
} |
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,33 @@ | ||
import React, { Component } from 'react'; | ||
import translate from 'translations'; | ||
import { NewTabLink } from 'components/ui'; | ||
import './Web3.scss'; | ||
|
||
interface Props { | ||
onUnlock(): void; | ||
} | ||
|
||
export default class Web3Decrypt extends Component<Props> { | ||
public render() { | ||
return ( | ||
<section className="Web3Decrypt col-md-4 col-sm-6"> | ||
<div> | ||
<button | ||
className="Web3Decrypt btn btn-primary btn-lg" | ||
onClick={this.props.onUnlock} | ||
> | ||
{translate('ADD_MetaMask')} | ||
</button> | ||
</div> | ||
|
||
<div> | ||
<NewTabLink | ||
className="Web3Decrypt-install btn btn-sm btn-default" | ||
content={translate('Download MetaMask')} | ||
href="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en" | ||
/> | ||
</div> | ||
</section> | ||
); | ||
} | ||
} |
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
Oops, something went wrong.