mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-24 16:49:30 +00:00
(Fix) Wrong owners name assignment on Safe Load (#2020)
* pad with zeroes so sorting works properly * fix @ts-eslint warnings
This commit is contained in:
parent
34a8bcc259
commit
188175d690
@ -1,13 +1,16 @@
|
||||
import { LoadFormValues } from 'src/routes/load/container/Load'
|
||||
import { CreateSafeValues } from 'src/routes/open/utils/safeDataExtractor'
|
||||
|
||||
export const FIELD_NAME = 'name'
|
||||
export const FIELD_CONFIRMATIONS = 'confirmations'
|
||||
export const FIELD_OWNERS = 'owners'
|
||||
export const FIELD_SAFE_NAME = 'safeName'
|
||||
export const FIELD_CREATION_PROXY_SALT = 'safeCreationSalt'
|
||||
|
||||
export const getOwnerNameBy = (index: number): string => `owner${index}Name`
|
||||
export const getOwnerAddressBy = (index: number): string => `owner${index}Address`
|
||||
export const getOwnerNameBy = (index: number): string => `owner${index.toString().padStart(4, '0')}Name`
|
||||
export const getOwnerAddressBy = (index: number): string => `owner${index.toString().padStart(4, '0')}Address`
|
||||
|
||||
export const getNumOwnersFrom = (values) => {
|
||||
export const getNumOwnersFrom = (values: CreateSafeValues | LoadFormValues): number => {
|
||||
const accounts = Object.keys(values)
|
||||
.sort()
|
||||
.filter((key) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user