1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Use ISO-8601 date format for last active time (#8306)

The last active time for each account in the Connected Sites list was
formatted as `yyyy-M-d` (i.e. without the zero-padding for the month
and the day). This didn't match the designs, isn't compliant with
ISO-8601, and generally isn't a common date format.

The month and day are now zero-padded.
This commit is contained in:
Mark Stacey 2020-04-08 10:21:56 -03:00 committed by GitHub
parent 55228ef08c
commit 5b64a3d75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ const mapStateToProps = (state, ownProps) => {
const addressLastConnectedMap = lastConnectedInfo[origin] || {}
Object.keys(addressLastConnectedMap).forEach((key) => {
addressLastConnectedMap[key] = formatDate(addressLastConnectedMap[key], 'yyyy-M-d')
addressLastConnectedMap[key] = formatDate(addressLastConnectedMap[key], 'yyyy-MM-dd')
})
const connectPath = `${CONNECT_ROUTE}/${permissionsRequestId}`

View File

@ -498,7 +498,7 @@ export function getRenderablePermissionsDomains (state) {
const selectedAddressLastConnectedTime = accountsLastConnectedTime[selectedAddress]
const lastConnectedTime = selectedAddressLastConnectedTime
? formatDate(selectedAddressLastConnectedTime, 'yyyy-M-d')
? formatDate(selectedAddressLastConnectedTime, 'yyyy-MM-dd')
: ''
return [ ...acc, {