Skip to content

Commit

Permalink
Last post-optin fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriaCarrera committed Jun 11, 2021
1 parent 565af56 commit a73c7ac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
7 changes: 6 additions & 1 deletion src/components/organisms/transaction/AggregateTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class AggregateTransaction extends BaseTransactionItem<Props> {
};

postLaunchAmount = () => {
if (!this.state) return 0;
const transaction: SdkAggregateTransaction = this.state.fullTransaction;
const innerTransactions = transaction && transaction.innerTransactions ? transaction.innerTransactions: [];
const currentAddress = this.props.address.replace(/-/g, '');
Expand Down Expand Up @@ -89,11 +90,15 @@ class AggregateTransaction extends BaseTransactionItem<Props> {
renderDetails = () => {
const { transaction, isLoading, isMultisig } = this.props;
if (this.isPostLaunchOptIn()) {
const amount = this.postLaunchAmount();
return (
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Icon style={{ width: 75, height: 50, marginBottom: 10 }} size="big" name="optin" />
<Text style={{ flex: 1 }} type="regular" align="right" theme="light">
{translate('optin.postLaunchTransactionText')} {this.postLaunchAmount()}
{transaction.status === 'confirmed'
? translate('optin.postLaunchTransactionText')
: translate('optin.postLaunchTransactionTextUnconfirmed')}{' '}
{amount}
</Text>
</View>
);
Expand Down
1 change: 1 addition & 0 deletions src/locales/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@
"presentationSlide3Note": "Note: it can take up to thirty (30) days for your XYM to successfully appear in your wallet.",
"noBalance": "You didn't have enough XEM in Snapshot or you already claimed them in a pre-launch opt-in.",
"postLaunchTransactionText": "The amount you have received:",
"postLaunchTransactionTextUnconfirmed": "The amount you will receive:",
"publicKeyPlaceholder": "Public key must be 64 hexadecimal characters long."
}
}
2 changes: 1 addition & 1 deletion src/screens/PostLaunchOptIn/OptInAccountDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class OptInAccountDetails extends Component<Props, State> {
const { selectedOptInStatus } = this.props;
if (!selectedOptInStatus.isMultisig) Router.goToOptInSelectSymbolAccount({ welcomeComponentId: this.props.welcomeComponentId }, this.props.componentId);
else if (!selectedOptInStatus.destination) Router.goToOptinSelectSymbolMultisigDestination({ welcomeComponentId: this.props.welcomeComponentId }, this.props.componentId);
else Router.goToOptInSelectSymbolAccount({ welcomeComponentId: this.props.welcomeComponentId }, this.props.componentId);
else Router.goToOptInFinish({ welcomeComponentId: this.props.welcomeComponentId }, this.props.componentId);
};

hasUserSigned = () => {
Expand Down
23 changes: 8 additions & 15 deletions src/screens/PostLaunchOptIn/OptInSelectSymbolAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,14 @@ class OptInSelectSymbolAccount extends Component<Props, State> {
</Text>
</View>
)}
{!selectedOptInStatus.isMultisig && (
<ListContainer type="list" style={styles.list} isScrollable={true}>
<FlatList
data={symbolAccounts}
renderItem={this.renderAccountItem}
onEndReachedThreshold={0.9}
keyExtractor={(item, index) => '' + index + 'account'}
/>
</ListContainer>
)}
{selectedOptInStatus.isMultisig && (
<Section type="form-bottom">
<Button text={translate('optin.next')} theme="light" onPress={() => this.finish()} />
</Section>
)}
<ListContainer type="list" style={styles.list} isScrollable={true}>
<FlatList
data={symbolAccounts}
renderItem={this.renderAccountItem}
onEndReachedThreshold={0.9}
keyExtractor={(item, index) => '' + index + 'account'}
/>
</ListContainer>
</GradientBackground>
//</ImageBackground>
);
Expand Down

0 comments on commit a73c7ac

Please sign in to comment.