mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 19:44:21 +00:00
merge develop info 'donation_addresses'
This commit is contained in:
parent
eaf76fb177
commit
7846b2125a
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import translate from 'translations';
|
import translate from 'translations';
|
||||||
|
import { donationAddressMap } from 'config/data';
|
||||||
|
|
||||||
export default class Donate extends React.Component {
|
export default class Donate extends React.Component {
|
||||||
props: {
|
props: {
|
||||||
@ -31,7 +32,7 @@ export default class Donate extends React.Component {
|
|||||||
|
|
||||||
onClick = () => {
|
onClick = () => {
|
||||||
// FIXME move to config
|
// FIXME move to config
|
||||||
this.props.onDonate('0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8', '1', 'ETH');
|
this.props.onDonate(donationAddressMap.ETH, '1', 'ETH');
|
||||||
|
|
||||||
this.setState({ clicked: true });
|
this.setState({ clicked: true });
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
import pickBy from 'lodash/pickBy';
|
import pickBy from 'lodash/pickBy';
|
||||||
// import type { Transaction } from './types';
|
// import type { Transaction } from './types';
|
||||||
import customMessages from './messages';
|
import customMessages from './messages';
|
||||||
|
import { donationAddressMap } from 'config/data';
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
hasQueryString: boolean,
|
hasQueryString: boolean,
|
||||||
@ -77,7 +78,15 @@ export class SendTransaction extends React.Component {
|
|||||||
const unitReadable = 'UNITREADABLE';
|
const unitReadable = 'UNITREADABLE';
|
||||||
const nodeUnit = 'NODEUNIT';
|
const nodeUnit = 'NODEUNIT';
|
||||||
const hasEnoughBalance = false;
|
const hasEnoughBalance = false;
|
||||||
const { to, value, unit, gasLimit, data, readOnly, hasQueryString } = this.state;
|
const {
|
||||||
|
to,
|
||||||
|
value,
|
||||||
|
unit,
|
||||||
|
gasLimit,
|
||||||
|
data,
|
||||||
|
readOnly,
|
||||||
|
hasQueryString
|
||||||
|
} = this.state;
|
||||||
const customMessage = customMessages.find(m => m.to === to);
|
const customMessage = customMessages.find(m => m.to === to);
|
||||||
|
|
||||||
// tokens
|
// tokens
|
||||||
@ -86,7 +95,7 @@ export class SendTransaction extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<section className="container" style={{ minHeight: '50%' }}>
|
<section className="container" style={{ minHeight: '50%' }}>
|
||||||
<div className="tab-content">
|
<div className="tab-content">
|
||||||
<main className="tab-pane active" ng-controller="sendTxCtrl">
|
<main className="tab-pane active">
|
||||||
|
|
||||||
{hasQueryString &&
|
{hasQueryString &&
|
||||||
<div className="alert alert-info">
|
<div className="alert alert-info">
|
||||||
@ -129,7 +138,7 @@ export class SendTransaction extends React.Component {
|
|||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<AddressField
|
<AddressField
|
||||||
placeholder="0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8"
|
placeholder={donationAddressMap.ETH}
|
||||||
value={this.state.to}
|
value={this.state.to}
|
||||||
onChange={readOnly ? null : this.onAddressChange}
|
onChange={readOnly ? null : this.onAddressChange}
|
||||||
/>
|
/>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
// @flow
|
// @flow
|
||||||
|
import { donationAddressMap } from 'config/data';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
// donation address example
|
// donation address example
|
||||||
to: '0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8',
|
to: donationAddressMap.ETH,
|
||||||
gasLimit: 21000,
|
gasLimit: 21000,
|
||||||
data: '',
|
data: '',
|
||||||
msg: 'Thank you for donating to MyEtherWallet. TO THE MOON!'
|
msg: 'Thank you for donating to MyEtherWallet. TO THE MOON!'
|
||||||
|
@ -4,6 +4,7 @@ import { delay } from 'redux-saga';
|
|||||||
import { cacheEnsAddress } from 'actions/ens';
|
import { cacheEnsAddress } from 'actions/ens';
|
||||||
import type { ResolveEnsNameAction } from 'actions/ens';
|
import type { ResolveEnsNameAction } from 'actions/ens';
|
||||||
import { getEnsAddress } from 'selectors/ens';
|
import { getEnsAddress } from 'selectors/ens';
|
||||||
|
import { donationAddressMap } from 'config/data';
|
||||||
|
|
||||||
function* resolveEns(action: ResolveEnsNameAction) {
|
function* resolveEns(action: ResolveEnsNameAction) {
|
||||||
const ensName = action.payload;
|
const ensName = action.payload;
|
||||||
@ -25,7 +26,7 @@ function* resolveEns(action: ResolveEnsNameAction) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
yield call(delay, 1000);
|
yield call(delay, 1000);
|
||||||
yield put(cacheEnsAddress(ensName, '0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8'));
|
yield put(cacheEnsAddress(ensName, donationAddressMap.ETH));
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function* notificationsSaga() {
|
export default function* notificationsSaga() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user