Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1071 from LiskHQ/1070-disallow-lowercase-address
Browse files Browse the repository at this point in the history
Disallow lowercase l in address - Closes #1070
  • Loading branch information
yasharAyari authored May 23, 2018
2 parents b06ba23 + fab95cf commit 12ccd0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/send/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Send extends React.Component {
...authStatePrefill(),
};
this.inputValidationRegexps = {
recipient: /^\d{1,21}[L|l]$/,
recipient: /^\d{1,21}L$/,
amount: /^\d+(\.\d{1,8})?$/,
};
}
Expand Down
12 changes: 6 additions & 6 deletions src/utils/api/account.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Lisk from 'lisk-elements';

export const getAccount = (activePeer, address) =>
new Promise((resolve) => {
new Promise((resolve, reject) => {
activePeer.accounts.get({ address }).then((res) => {
if (res.data.length > 0) {
resolve({
Expand All @@ -16,21 +16,21 @@ export const getAccount = (activePeer, address) =>
balance: 0,
});
}
});
}).catch(reject);
});

export const setSecondPassphrase = (activePeer, secondPassphrase, publicKey, passphrase) =>
new Promise((resolve) => {
new Promise((resolve, reject) => {
const transaction = Lisk.transaction
.registerSecondPassphrase({ passphrase, secondPassphrase });
activePeer.transactions.broadcast(transaction).then(() => {
resolve(transaction);
});
}).catch(reject);
});

export const send = (activePeer, recipientId, amount,
passphrase, secondPassphrase = null, data = null) =>
new Promise((resolve) => {
new Promise((resolve, reject) => {
const transaction = Lisk.transaction
.transfer({
recipientId,
Expand All @@ -41,7 +41,7 @@ export const send = (activePeer, recipientId, amount,
});
activePeer.transactions.broadcast(transaction).then(() => {
resolve(transaction);
});
}).catch(reject);
});

export const transactions = (activePeer, address, limit = 20, offset = 0, sort = 'timestamp:desc') =>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/api/delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ export const unvoteAutocomplete = (username, votedDict) =>
);

export const registerDelegate = (activePeer, username, passphrase, secondPassphrase = null) =>
new Promise((resolve) => {
new Promise((resolve, reject) => {
const transaction = Lisk.transaction
.registerDelegate({
username,
passphrase,
secondPassphrase });
activePeer.transactions.broadcast(transaction).then(() => {
resolve(transaction);
});
}).catch(reject);
});

0 comments on commit 12ccd0d

Please sign in to comment.