-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DDW-149] Undelegating a wallet (#2351)
* [DDW-149] Implement undelegate wallet dialog on wallet settings screen * [DDW-149] Update changelog * [DDW-149] Update fees and deposit of undelegate wallet confirmation dialog * [DDW-149] Show fees as absolute value on delegation/undelegation dialogs * [DDW-149] Hide undelegate wallet panel for byron wallet * [DDW-149] Add disability to undelegate wallet button * [DDW-149] Disable undelegate button when wallet is not delegated yet or being restored * [DDW-149] Fix flow test * [DDW-149] Update undelegate wallet panel on wallet settings screen * [DDW-149] Update undelegate wallet title translations * [DDW-149] Update undelegate wallet translations * [DDW-149] Enable hardware wallet undelegation * [DDW-149] Fix delegation fee calculation handler * [DDW-149] Remove unnecessary undelege wallet handlers * [DDW-149] Add delegate and undelegate config * [DDW-149] Update undeleate wallet variable naming * [DDW-149] Remove unnecessary fee absolute value transformation * [DDW-149] Update config variable names * [DDW-149] Remove unnecessary variable of stake pool quit request payload * [DDW-149] Adjust undelegate wallet box margin * [DDW-149] Update undelegate wallet success dialog naming * [DDW-149] Update undelegate wallet panel button click handler names * [DDW-149] Update undelegate wallet panel styles * [DDW-149] Update undelegate wallet panel styles * [DDW-149] Add undelegate wallet config comment * [DDW-149] Update props definition of undelegate wallet dialog container * [DDW-149] Fix storybook error * [DDW-149] Add hardware wallet story for undelegating * [DDW-149] Change Wallet Settings Delegation to reflect Future Epoch * [DDW-149] Fix issue with null status * [DDW-149] Add Storybook groupId * Updates CHANGELOG, Disables 'Voting Center' for Flight builds * Re-enable Voting registration on Flight * [DDW-149] Merges develop * [DDW-149] Update hardware wallet fee calculation * [DDW-149] Update delegation and undelegation fee calculation * [DDW-149] Update wallet sync status checking on wallet settings screen * [DDW-149] Show warning on wallet settings screen for non delegated wallet when syncing * [DDW-149] Fix japanese translation * [DDW-149] Bignumber isZero function exception handling * [DDW-149] Fix CHANGELOG * [DDW-149] Apply current delegation status also to the wallet delegation status * [DDW-149] Fix variable naming * [DDW-149] Fix undelegate wallet box style * [DDW-149] Fix delegation check logic * [DDW-149] Remove rewarded wallet invisibility on undelegation box * [DDW-149] Disable wallet undelegation Co-authored-by: Danilo Prates <daniloprates@gmail.com> Co-authored-by: Nikola Glumac <niglumac@gmail.com>
- Loading branch information
1 parent
3be768b
commit bdbb16e
Showing
47 changed files
with
1,306 additions
and
572 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
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
37 changes: 37 additions & 0 deletions
37
source/renderer/app/components/wallet/settings/DelegateWalletButton.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,37 @@ | ||
// @flow | ||
import React, { Component } from 'react'; | ||
import { defineMessages, intlShape } from 'react-intl'; | ||
import { Button } from 'react-polymorph/lib/components/Button'; | ||
import styles from './DelegateWalletButton.scss'; | ||
|
||
const messages = defineMessages({ | ||
label: { | ||
id: 'wallet.settings.delegateWalletButtonLabel', | ||
defaultMessage: '!!!Delegate', | ||
description: 'Label for the delegate button on wallet settings', | ||
}, | ||
}); | ||
|
||
type Props = { | ||
disabled?: boolean, | ||
onDelegate: Function, | ||
}; | ||
|
||
export default class DelegateWalletButton extends Component<Props> { | ||
static contextTypes = { | ||
intl: intlShape.isRequired, | ||
}; | ||
|
||
render() { | ||
const { disabled, onDelegate } = this.props; | ||
const label = this.context.intl.formatMessage(messages.label); | ||
return ( | ||
<Button | ||
label={label} | ||
disabled={disabled} | ||
onClick={onDelegate} | ||
themeOverrides={styles} | ||
/> | ||
); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
source/renderer/app/components/wallet/settings/DelegateWalletButton.scss
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,8 @@ | ||
.root { | ||
font-weight: 500; | ||
height: 36px; | ||
line-height: 36px; | ||
margin-left: 20px; | ||
min-width: 160px; | ||
width: 160px; | ||
} |
38 changes: 38 additions & 0 deletions
38
source/renderer/app/components/wallet/settings/UndelegateWalletButton.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,38 @@ | ||
// @flow | ||
import React, { Component } from 'react'; | ||
import { defineMessages, intlShape } from 'react-intl'; | ||
import { Button } from 'react-polymorph/lib/components/Button'; | ||
import styles from './UndelegateWalletButton.scss'; | ||
|
||
const messages = defineMessages({ | ||
label: { | ||
id: 'wallet.settings.undelegateWalletButtonLabel', | ||
defaultMessage: '!!!Undelegate', | ||
description: 'Label for the undelegate button on wallet settings', | ||
}, | ||
}); | ||
|
||
type Props = { | ||
disabled?: boolean, | ||
onUndelegate: Function, | ||
}; | ||
|
||
export default class UndelegateWalletButton extends Component<Props> { | ||
static contextTypes = { | ||
intl: intlShape.isRequired, | ||
}; | ||
|
||
render() { | ||
const { disabled, onUndelegate } = this.props; | ||
const label = this.context.intl.formatMessage(messages.label); | ||
return ( | ||
<Button | ||
className="flat" | ||
label={label} | ||
disabled={disabled} | ||
onClick={onUndelegate} | ||
themeOverrides={styles} | ||
/> | ||
); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
source/renderer/app/components/wallet/settings/UndelegateWalletButton.scss
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,8 @@ | ||
.root { | ||
font-weight: 500; | ||
height: 36px; | ||
line-height: 36px; | ||
margin-left: 20px; | ||
min-width: 160px; | ||
width: 160px; | ||
} |
Oops, something went wrong.