Skip to content

Commit

Permalink
Display unclaimed balance and better detection of unclaimed (for PEOS)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Mar 3, 2019
1 parent 69e4d28 commit 7324c73
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/renderer/assets/locales/en-US/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"tools_airgrab_anything_missing": "Is an airdrop missing from this list? If so, let us know by dropping by the Greymass Wallet telegram channel: ",
"tools_airgrabs_already_claimed": "Already Claimed",
"tools_airgrabs_claim": "Claim",
"tools_airgrabs_unclaimed": "Unclaimed",
"tools_airgrabs_header": "Airgrabs",
"tools_airgrabs_message_warning": "This transaction will consume RAM.",
"tools_airgrabs_no_match": "No airgrabs match these filters",
Expand Down
15 changes: 14 additions & 1 deletion app/shared/components/Tools/Airgrabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,17 @@ class ToolsAirgrabs extends PureComponent<Props> {
<Table.HeaderCell>
{t('tools_airgrabs_until')}
</Table.HeaderCell>
<Table.HeaderCell textAlign="right">
{t('tools_airgrabs_unclaimed')}
</Table.HeaderCell>
<Table.HeaderCell />
</Table.Row>
</Table.Header>
<Table.Body>
{filteredAirgrabs.map((airgrab) => {
const airgrabAccounts = get(tables, `${airgrab.account}.${settings.account}.accounts.rows`) || [];
const claimed = airgrabAccounts.length > 0;
const unclaimedBalance = (airgrabAccounts && airgrabAccounts.length && airgrabAccounts[0].claimed === 0);
const claimed = (airgrabAccounts.length > 0 && !unclaimedBalance);
return (
<Table.Row key={airgrab.symbol}>
<Table.Cell>
Expand All @@ -196,6 +200,15 @@ class ToolsAirgrabs extends PureComponent<Props> {
}
/>
<Table.Cell
collapsing
content={unclaimedBalance ?
airgrabAccounts[0].balance :
'~'
}
textAlign="right"
/>
<Table.Cell
collapsing
textAlign="right"
>
<Button
Expand Down

0 comments on commit 7324c73

Please sign in to comment.