-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add Email and Registry lookups to Address Selector #3992
Conversation
Changes Unknown when pulling 76496bb on ng-address-from-regs into ** on master**. |
const { address, value } = regsitryValue; | ||
const account = { address, name: value, index: address }; | ||
|
||
.map((regsitryValue, index) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo. 😉
.instance | ||
.reverse.call({}, [ sha3(value) ]); | ||
}, | ||
describe: (value) => `${value} (from email verification)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer "Verified using email …", as this is being shown inside and account card.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are doing this fresh, create strings with FormattedMessage
so we don't need to circle back. (Also for the labels in this store)
@@ -52,6 +52,11 @@ | |||
} | |||
} | |||
|
|||
.description { | |||
font-size: 0.75em; | |||
color: rgba(255, 255, 255, 0.498039); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it 0.5 alpha, Chrome creates these numbers when inspecting.
return registryInstance | ||
.getAddress.call({}, [ sha3(value), 'A' ]); | ||
}, | ||
describe: (value) => `${value} (from registry)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<FormattedMessage
id='addressSelect.fromRegistry'
defaultMessage='{value} (from registry)'
values={ {
value
} } />
.filterValues(category.values, value) | ||
.map((value) => { | ||
index++; | ||
return { ...value, index: parseInt(index) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer
return {
index: parseInt(index),
...value
};
} | ||
|
||
const account = flatMap(this.initValues, (cat) => cat.values) | ||
.find((account) => account.address.toLowerCase() === result.toLowerCase()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to lowercase result each callback? Could do it outside and assign to variable being tested.
|
||
this.initValues = [ | ||
{ | ||
label: 'accounts', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Labels as per comment above.
return null; | ||
} | ||
|
||
const accounts = regsitryValues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registryValues
(typo, also registryValue below as well as the function name)
Fixed |
Changes Unknown when pulling 53e5b4c on ng-address-from-regs into ** on master**. |
Closes #3871
Adds to the new Address Selector lookups capabilities from the Registry and the Email Verification contract.
The result is shown right under the input.
It also fixes some issues in the component.