Skip to content

Commit

Permalink
Merge pull request #1397 from LiskHQ/1281-account-initialization
Browse files Browse the repository at this point in the history
Transactions to 'yourself' are all seen as "account initialization" - Closes #1281
  • Loading branch information
bmaggi-lisk authored Oct 31, 2018
2 parents 4ce46b9 + 8463eb1 commit 8d91de8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/sendReadable/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class SendReadable extends React.Component {
amount: this.state.amount.value,
passphrase: this.props.passphrase.value,
secondPassphrase: this.props.secondPassphrase.value,
data: this.props.reference,
data: this.props.accountInit ? this.props.t('Account initialization') : this.props.reference,
});
}

Expand Down
3 changes: 0 additions & 3 deletions src/components/transactions/transactionType.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ const TransactionType = (props) => {
const { t } = props;
let type;
switch (props.type) {
case 0:
type = props.senderId === props.recipientId ? t('Account initialization') : false;
break;
case 1:
type = t('Second passphrase registration');
break;
Expand Down
13 changes: 3 additions & 10 deletions test/cypress/e2e/transfer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@ describe('Transfer', () => {
cy.get('@tx').find(ss.transactionAddress).should('have.text', randomAddress);
});

it('Transfer to myself appears as account initialization', () => {
cy.autologin(accounts.genesis.passphrase, networks.devnet.node);
cy.visit(urls.wallet);
cy.get(ss.recipientInput).type(accounts.genesis.address);
cy.get(ss.amountInput).click().type(randomAmount);
cy.get(ss.nextButton).click();
cy.get(ss.sendButton).click();
cy.get(ss.transactionRow).eq(0).find(ss.transactionAddress).should('have.text', msg.accountInitializatoinAddress);
});

it('Launch protocol link prefills recipient, amount and reference', () => {
cy.autologin(accounts.genesis.passphrase, networks.devnet.node);
cy.visit('/wallet?recipient=4995063339468361088L&amount=5&reference=test');
Expand Down Expand Up @@ -172,5 +162,8 @@ describe('Transfer', () => {
cy.wait(txConfirmationTimeout);
cy.reload();
cy.get(ss.accountInitializationMsg).should('not.exist');
cy.get(ss.transactionRow).eq(0).as('tx');
cy.get('@tx').find(ss.transactionAddress).should('have.text', accounts['without initialization'].address);
cy.get('@tx').find(ss.transactionReference).should('have.text', 'Account initialization');
});
});
2 changes: 1 addition & 1 deletion test/integration/wallet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('@integration: Wallet', () => {
match.defined,
match.defined,
null,
undefined,
'Account initialization',
).returnsPromise().resolves({ data: [] });
});

Expand Down

0 comments on commit 8d91de8

Please sign in to comment.