+
+
+
+ {translate('ORDER_SAFE_T')}
+
+
+
{error || '-'}
+
+
+
+ );
+ }
+
+ private handlePathChange = (dPath: DPath) => {
+ this.setState({ dPath });
+ this.handleConnect(dPath);
+ };
+
+ private handleConnect = (dPath: DPath): void => {
+ this.setState({
+ isLoading: true,
+ error: null
+ });
+
+ SafeTWallet.getChainCode(dPath.value)
+ .then(res => {
+ this.setState({
+ dPath,
+ publicKey: res.publicKey,
+ chainCode: res.chainCode,
+ isLoading: false
+ });
+ })
+ .catch(err => {
+ this.setState({
+ error: err.message,
+ isLoading: false
+ });
+ });
+ };
+
+ private handleCancel = () => {
+ this.reset();
+ };
+
+ private handleUnlock = (address: string, index: number) => {
+ this.props.onUnlock(new SafeTWallet(address, this.state.dPath.value, index));
+ this.reset();
+ };
+
+ private handleNullConnect = (): void => {
+ this.handleConnect(this.state.dPath);
+ };
+
+ private reset() {
+ this.setState({
+ publicKey: '',
+ chainCode: '',
+ dPath: this.props.dPath || this.props.dPaths[0]
+ });
+ }
+}
+
+function mapStateToProps(state: AppState): StateProps {
+ return {
+ dPath: getSingleDPath(state, SecureWalletName.SAFE_T),
+ dPaths: getPaths(state, SecureWalletName.SAFE_T)
+ };
+}
+
+export const SafeTminiDecrypt = connect(mapStateToProps)(SafeTminiDecryptClass);
diff --git a/common/components/WalletDecrypt/components/WalletButton.scss b/common/components/WalletDecrypt/components/WalletButton.scss
index a093d70f..bc8ed86f 100644
--- a/common/components/WalletDecrypt/components/WalletButton.scss
+++ b/common/components/WalletDecrypt/components/WalletButton.scss
@@ -30,7 +30,7 @@
animation: wallet-button-enter 400ms ease 1;
animation-fill-mode: backwards;
- @for $i from 0 to 5 {
+ @for $i from 0 to 6 {
&:nth-child(#{$i}) {
animation-delay: 100ms + ($i * 60ms);
}
diff --git a/common/components/WalletDecrypt/components/index.tsx b/common/components/WalletDecrypt/components/index.tsx
index c2aed00d..9efd6af7 100644
--- a/common/components/WalletDecrypt/components/index.tsx
+++ b/common/components/WalletDecrypt/components/index.tsx
@@ -7,6 +7,7 @@ export * from './Mnemonic';
export * from './ParitySigner';
export * from './PrivateKey';
export * from './Trezor';
+export * from './SafeT';
export * from './ViewOnly';
export * from './WalletButton';
export * from './Web3';
diff --git a/common/components/WalletDecrypt/disables.ts b/common/components/WalletDecrypt/disables.ts
index 3ed1fde3..6188a25b 100644
--- a/common/components/WalletDecrypt/disables.ts
+++ b/common/components/WalletDecrypt/disables.ts
@@ -22,9 +22,10 @@ export const DISABLE_WALLETS: { [key in WalletMode]: DisabledWallets } = {
}
},
[WalletMode.UNABLE_TO_SIGN]: {
- wallets: [SecureWalletName.TREZOR, MiscWalletName.VIEW_ONLY],
+ wallets: [SecureWalletName.TREZOR, SecureWalletName.SAFE_T, MiscWalletName.VIEW_ONLY],
reasons: {
[SecureWalletName.TREZOR]: 'This wallet can’t sign messages',
+ [SecureWalletName.SAFE_T]: 'This wallet can’t sign messages',
[MiscWalletName.VIEW_ONLY]: 'This wallet can’t sign messages'
}
}
diff --git a/common/config/data.tsx b/common/config/data.tsx
index aa9820fe..155d1492 100644
--- a/common/config/data.tsx
+++ b/common/config/data.tsx
@@ -55,6 +55,9 @@ export const MINIMUM_PASSWORD_LENGTH = 12;
export const knowledgeBaseURL = 'https://support.mycrypto.com';
export const ledgerReferralURL = 'https://www.ledgerwallet.com/r/1985?path=/products/';
export const trezorReferralURL = 'https://shop.trezor.io?a=mycrypto.com';
+// TODO - Update url
+export const safeTReferralURL =
+ 'https://www.archos.com/fr/products/crypto/archos_safetmini/index.html';
export const bitboxReferralURL = 'https://digitalbitbox.com/?ref=mycrypto';
// TODO - Update url, this is MEW's
export const bityReferralURL = 'https://bity.com/af/jshkb37v';
@@ -69,12 +72,14 @@ export enum SecureWalletName {
WEB3 = 'web3',
LEDGER_NANO_S = 'ledgerNanoS',
TREZOR = 'trezor',
+ SAFE_T = 'safeTmini',
PARITY_SIGNER = 'paritySigner'
}
export enum HardwareWalletName {
LEDGER_NANO_S = 'ledgerNanoS',
- TREZOR = 'trezor'
+ TREZOR = 'trezor',
+ SAFE_T = 'safeTmini'
}
export enum InsecureWalletName {
diff --git a/common/config/dpaths.ts b/common/config/dpaths.ts
index 5af627f2..544b0c4a 100644
--- a/common/config/dpaths.ts
+++ b/common/config/dpaths.ts
@@ -8,6 +8,11 @@ export const ETH_TREZOR: DPath = {
value: "m/44'/60'/0'/0"
};
+export const ETH_SAFE_T: DPath = {
+ label: 'Safe-T (ETH)',
+ value: "m/44'/60'/0'/0"
+};
+
export const ETH_LEDGER: DPath = {
label: 'Ledger (ETH)',
value: "m/44'/60'/0'"
@@ -23,6 +28,11 @@ export const ETC_TREZOR: DPath = {
value: "m/44'/61'/0'/0"
};
+export const ETC_SAFE_T: DPath = {
+ label: 'Safe-T (ETC)',
+ value: "m/44'/61'/0'/0"
+};
+
export const ETH_TESTNET: DPath = {
label: 'Testnet (ETH)',
value: "m/44'/1'/0'/0"
@@ -106,9 +116,11 @@ export const ESN_DEFAULT: DPath = {
export const DPaths: DPath[] = [
ETH_DEFAULT,
ETH_TREZOR,
+ ETH_SAFE_T,
ETH_LEDGER,
ETC_LEDGER,
ETC_TREZOR,
+ ETC_SAFE_T,
ETH_TESTNET,
EXP_DEFAULT,
UBQ_DEFAULT,
diff --git a/common/config/links.ts b/common/config/links.ts
index 3e5c979c..0b35dda9 100644
--- a/common/config/links.ts
+++ b/common/config/links.ts
@@ -3,6 +3,7 @@ import {
discordURL,
ledgerReferralURL,
trezorReferralURL,
+ safeTReferralURL,
ethercardReferralURL,
keepkeyReferralURL,
steelyReferralURL
@@ -84,6 +85,10 @@ export const affiliateLinks: Link[] = [
link: trezorReferralURL,
text: translateRaw('TREZOR_REFERAL')
},
+ {
+ link: safeTReferralURL,
+ text: translateRaw('SAFE_T_REFERAL')
+ },
{
link: keepkeyReferralURL,
text: translateRaw('KEEPKEY_REFERRAL')
diff --git a/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx b/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx
index b2d41fa4..a1f96364 100644
--- a/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx
+++ b/common/containers/Tabs/SignAndVerifyMessage/components/SignMessage/index.tsx
@@ -18,6 +18,7 @@ interface Props {
signMessageRequested: messageActions.TSignMessageRequested;
signedMessage: ISignedMessage | null;
resetWallet: walletActions.TResetWallet;
+ resetMessage: messageActions.TResetMessage;
}
interface State {
@@ -35,6 +36,7 @@ export class SignMessage extends Component