meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
4 changed files with
12 additions and
3 deletions
-
src/components/AccountPage/index.js
-
src/components/TransactionsList/index.js
-
src/components/modals/SettingsAccount.js
-
src/reducers/accounts.js
|
|
@ -69,7 +69,7 @@ class AccountPage extends PureComponent<Props> { |
|
|
|
</Box> |
|
|
|
</Button> |
|
|
|
<Button |
|
|
|
style={{ width: 40, padding: 0 }} |
|
|
|
style={{ width: 30, padding: 0 }} |
|
|
|
onClick={() => openModal(MODAL_SETTINGS_ACCOUNT, { account })} |
|
|
|
> |
|
|
|
<Box align="center"> |
|
|
@ -82,7 +82,10 @@ class AccountPage extends PureComponent<Props> { |
|
|
|
<Text fontSize={5}>{formatBTC(account.balance)}</Text> |
|
|
|
</Card> |
|
|
|
<Card p={0} px={4} title={t('account:lastOperations')}> |
|
|
|
<TransactionsList transactions={account.transactions} /> |
|
|
|
<TransactionsList |
|
|
|
transactions={account.transactions} |
|
|
|
minConfirmations={account.settings.minConfirmations} |
|
|
|
/> |
|
|
|
</Card> |
|
|
|
</Box> |
|
|
|
) |
|
|
|
|
|
@ -184,6 +184,10 @@ class TransactionsList extends Component<Props> { |
|
|
|
} |
|
|
|
|
|
|
|
shouldComponentUpdate(nextProps: Props) { |
|
|
|
if (this.props.minConfirmations !== nextProps.minConfirmations) { |
|
|
|
return true |
|
|
|
} |
|
|
|
|
|
|
|
if (this._hashCache === null) { |
|
|
|
return true |
|
|
|
} |
|
|
|
|
|
@ -91,7 +91,7 @@ class SettingsAccount extends PureComponent<Props, State> { |
|
|
|
...account, |
|
|
|
settings: { |
|
|
|
...account.settings, |
|
|
|
minConfirmations, |
|
|
|
minConfirmations: Number(minConfirmations), |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
@ -120,6 +120,7 @@ export function serializeAccounts(accounts: Array<Object>) { |
|
|
|
name: account.name || `${key}`, |
|
|
|
path: account.path, |
|
|
|
unit: account.unit || getDefaultUnitByCoinType(account.coinType), |
|
|
|
settings: account.settings, |
|
|
|
} |
|
|
|
|
|
|
|
return { |
|
|
@ -144,6 +145,7 @@ export function deserializeAccounts(accounts: Accounts) { |
|
|
|
path: account.path, |
|
|
|
transactions: account.transactions.map(({ account, ...t }) => t), |
|
|
|
unit: account.unit, |
|
|
|
settings: account.settings, |
|
|
|
})) |
|
|
|
} |
|
|
|
|
|
|
|