File tree Expand file tree Collapse file tree
MultisigAddressCreateDialog
tests/getMultisigSignStatus Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
2525 getMultisigSyncProgress ,
2626} from 'services/remote'
2727import { computeScriptHash } from '@ckb-lumos/lumos/utils'
28- import { remaindRegenerateMultisigAddress } from 'services/localCache'
28+ import { remindRegenerateMultisigAddress } from 'services/localCache'
2929
3030export const useSearch = ( clearSelected : ( ) => void , onFilterConfig : ( searchKey : string ) => void ) => {
3131 const [ keywords , setKeywords ] = useState ( '' )
@@ -321,7 +321,7 @@ const useRegenerateAction = (regenerateConfig: (config: MultisigConfig) => Promi
321321 ( e : React . ChangeEvent < HTMLInputElement > ) => {
322322 const { checked } = e . target
323323 setIsNoRemind ( checked )
324- remaindRegenerateMultisigAddress . save ( checked )
324+ remindRegenerateMultisigAddress . save ( checked )
325325 } ,
326326 [ setIsNoRemind ]
327327 )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ import Button from 'widgets/Button'
5050import SetStartBlockNumberDialog from 'components/SetStartBlockNumberDialog'
5151import { type TFunction } from 'i18next'
5252import hooks from 'components/NervosDAO/hooks'
53- import { remaindRegenerateMultisigAddress } from 'services/localCache'
53+ import { remindRegenerateMultisigAddress } from 'services/localCache'
5454import {
5555 useSearch ,
5656 useConfigManage ,
@@ -189,7 +189,7 @@ const MultisigAddress = () => {
189189 daoWithdrawAction . action ( multisigConfig )
190190 break
191191 case 'regenerate' :
192- if ( remaindRegenerateMultisigAddress . get ( ) ) {
192+ if ( remindRegenerateMultisigAddress . get ( ) ) {
193193 regenerateAction . action ( multisigConfig )
194194 } else {
195195 regenerateAction . setConfig ( multisigConfig )
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'
33import { useState as useGlobalState } from 'states'
44import { MultisigConfig } from 'services/remote'
55import MultisigAddressInfo , { MultisigAddressTable } from 'components/MultisigAddressInfo'
6- import { isMainnet as isMainnetUtil } from 'utils'
6+ import { isMainnet as isMainnetUtil , MultiSigLockInfo } from 'utils'
77import Dialog from 'widgets/Dialog'
88import TextField from 'widgets/TextField'
99import { useMAndN , useMultiAddress , useViewMultisigAddress } from './hooks'
@@ -90,6 +90,7 @@ const MultisigAddressCreateDialog = ({
9090 n : Number ( n ) ,
9191 r : Number ( r ) ,
9292 addresses,
93+ lockCodeHash : MultiSigLockInfo . CodeHash ,
9394 } )
9495 . then ( ( ) => {
9596 closeDialog ( )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export enum LocalCacheKey {
1313 ShownNodeId = 'ShownNodeId' ,
1414 ScreenAwake = 'ScreenAwake' ,
1515 RetryUnlockWindowInfo = 'RetryUnlockWindowInfo' ,
16- RemaindRegenerateMultisigAddress = 'RemaindRegenerateMultisigAddress ' ,
16+ RemindRegenerateMultisigAddress = 'RemindRegenerateMultisigAddress ' ,
1717}
1818
1919export const addresses = {
@@ -196,12 +196,12 @@ export const retryUnlockWindow = {
196196 } ,
197197}
198198
199- export const remaindRegenerateMultisigAddress = {
199+ export const remindRegenerateMultisigAddress = {
200200 get : ( ) => {
201- const value = window . localStorage . getItem ( LocalCacheKey . RemaindRegenerateMultisigAddress )
201+ const value = window . localStorage . getItem ( LocalCacheKey . RemindRegenerateMultisigAddress )
202202 return ! ! value && value === 'true'
203203 } ,
204204 save : ( value : boolean ) => {
205- window . localStorage . setItem ( LocalCacheKey . RemaindRegenerateMultisigAddress , value . toString ( ) )
205+ window . localStorage . setItem ( LocalCacheKey . RemindRegenerateMultisigAddress , value . toString ( ) )
206206 } ,
207207}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export type MultisigEntity = MultisigParams & {
2828export type MultisigConfig = MultisigEntity & {
2929 addresses : string [ ]
3030 fullPayload : string
31- isLegacy : boolean
31+ isLegacy ? : boolean
3232}
3333
3434export const saveMultisigConfig = remoteApi < PartialSome < MultisigEntity , 'id' > , MultisigEntity > ( 'save-multisig-config' )
Original file line number Diff line number Diff line change 11import { describe , it , expect } from 'vitest'
22import { MultisigConfig } from 'services/remote'
3- import { addressToScript , getMultisigSignStatus } from 'utils'
3+ import { addressToScript , getMultisigSignStatus , MultiSigLockInfo } from 'utils'
44import { computeScriptHash } from '@ckb-lumos/lumos/utils'
55
66const addresses = [
@@ -16,7 +16,8 @@ const multisigConfig: MultisigConfig = {
1616 n : 3 ,
1717 addresses,
1818 blake160s : addresses . map ( v => addressToScript ( v ) . args ) ,
19- fullPayload : 'ckt1qpw9q60tppt7l3j7r09qcp7lxnp3vcanvgha8pmvsa3jplykxn32sq2f2scddm0lvmq36hmzx8nfhw8ucxzslhqussgky' ,
19+ lockCodeHash : MultiSigLockInfo . CodeHash ,
20+ fullPayload : 'ckt1qqmvjudc6s0mm992hjnhm367sfnjntycg3a5d7g7qpukz4wamvxjjq593v2gev3yp5sxmfr002ydqrcdpepwfkqwqz8gp' ,
2021}
2122const fullPayloadHash = computeScriptHash ( addressToScript ( multisigConfig . fullPayload ) )
2223
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ declare namespace State {
126126 m : number
127127 n : number
128128 blake160s : string [ ]
129+ lockCodeHash : string
129130 }
130131 onSuccess ?: ( ) => void
131132 showType ?: 'Global' | ''
You can’t perform that action at this time.
0 commit comments