Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ckb-light-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.4.1
v0.5.0
2 changes: 1 addition & 1 deletion .ckb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.201.0
v0.202.0
22 changes: 22 additions & 0 deletions compatible.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"fullVersions": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -23,13 +24,15 @@
"0.103"
],
"lightVersions": [
"0.5",
"0.4",
"0.3",
"0.2"
],
"compatible": {
"0.111": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -47,13 +50,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.110": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -71,6 +76,7 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
Expand All @@ -94,6 +100,7 @@
},
"0.112": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -111,13 +118,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.114": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -135,13 +144,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.116": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -159,13 +170,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.117": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -183,13 +196,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.119": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -207,13 +222,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.120": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -231,13 +248,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.121": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -255,13 +274,15 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
]
},
"0.201": {
"full": [
"0.202",
"0.201",
"0.200",
"0.121",
Expand All @@ -279,6 +300,7 @@
"0.109"
],
"light": [
"0.5",
"0.4",
"0.3",
"0.2"
Expand Down
6 changes: 3 additions & 3 deletions packages/neuron-wallet/.env
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ MAINNET_MULTISIG_TXHASH=0x6888aa39ab30c570c2c30d9d5684d3769bf77265a7973211a3c087
TESTNET_MULTISIG_TXHASH=0x2eefdeb21f3a3edf697c28a52601b4419806ed60bb427420455cc29a090b26d5

# CKB NODE OPTIONS
CKB_NODE_ASSUME_VALID_TARGET='0x8d98cc0af11e54e7c66b10d188cea7bd1ec33acee624eb0fddd9bb6951cf720e'
CKB_NODE_ASSUME_VALID_TARGET_BLOCK_NUMBER=16284813
CKB_NODE_DATA_SIZE=125
CKB_NODE_ASSUME_VALID_TARGET='0x983fed642041094a75fbc6a06b4d88c3d4db9ebe43b14f103ec5b8086cd5d96c'
CKB_NODE_ASSUME_VALID_TARGET_BLOCK_NUMBER=16516767
CKB_NODE_DATA_SIZE=126
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ export default class IndexerCacheService {
lockScript: addressMeta.generateSingleMultiSignLockScript(),
argsLen: 28,
},
{
lockScript: addressMeta.generateLegacySingleMultiSignLockScript(),
argsLen: 28,
},
{
lockScript: addressMeta.generateChequeLockScriptWithReceiverLockHash(),
argsLen: 40,
Expand Down
6 changes: 5 additions & 1 deletion packages/neuron-wallet/src/database/address/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,17 @@ export default class AddressMeta implements Address {
return SystemScriptInfo.generateSecpScript(this.blake160)
}

public generateSingleMultiSignLockScript(): Script {
public generateLegacySingleMultiSignLockScript(): Script {
return SystemScriptInfo.generateMultiSignScript(
Multisig.hash([this.blake160]),
SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH
)
}

public generateSingleMultiSignLockScript(): Script {
return SystemScriptInfo.generateMultiSignScript(Multisig.hash([this.blake160]), SystemScriptInfo.MULTISIG_CODE_HASH)
}

public generateACPLockScript(): Script {
const assetAccountInfo = new AssetAccountInfo()
return assetAccountInfo.generateAnyoneCanPayScript(this.blake160)
Expand Down
7 changes: 7 additions & 0 deletions packages/neuron-wallet/src/exceptions/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export class TransactionInputParameterMiss extends Error {
}
}

export class UnrecognizedLockScript extends Error {
public code = 117
constructor(message: string) {
super(message)
}
}

export default {
TransactionNotFound,
CapacityTooSmall,
Expand Down
6 changes: 6 additions & 0 deletions packages/neuron-wallet/src/locales/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ export default {
ignore: 'تجاهل واستمرار',
},
},
'unrecognized-multisig-transaction': {
message: 'هذه معاملة متعددة التوقيعات. يرجى الموافقة عليها من عنوان التوقيع المتعدد باستخدام المحفظة المناسبة.',
buttons: {
cancel: 'إلغاء',
},
},
},
prompt: {
password: {
Expand Down
7 changes: 7 additions & 0 deletions packages/neuron-wallet/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@ export default {
ignore: 'Ignore and continue',
},
},
'unrecognized-multisig-transaction': {
message:
'This is a multisig transaction. Please approve it from the multisig address using the appropriate wallet. ',
buttons: {
cancel: 'Cancel',
},
},
},
prompt: {
password: {
Expand Down
7 changes: 7 additions & 0 deletions packages/neuron-wallet/src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ export default {
ignore: 'Ignorar y continuar',
},
},
'unrecognized-multisig-transaction': {
message:
'Esta es una transacción multisignatura. Por favor, apróbala desde la dirección multisignatura utilizando la billetera correspondiente.',
buttons: {
cancel: 'Cancelar',
},
},
},
prompt: {
password: {
Expand Down
7 changes: 7 additions & 0 deletions packages/neuron-wallet/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ export default {
ignore: 'Ignorer et continuer',
},
},
'unrecognized-multisig-transaction': {
message:
"Il s'agit d'une transaction multisignature. Veuillez l'approuver depuis l'adresse multisignature en utilisant le portefeuille approprié.",
buttons: {
cancel: 'Annuler',
},
},
},
prompt: {
password: {
Expand Down
6 changes: 6 additions & 0 deletions packages/neuron-wallet/src/locales/zh-tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ export default {
ignore: '忽略並繼續',
},
},
'unrecognized-multisig-transaction': {
message: '這是一筆多簽交易。請使用對應的錢包在多簽地址中批准該交易。',
buttons: {
cancel: '取消',
},
},
},
prompt: {
password: {
Expand Down
6 changes: 6 additions & 0 deletions packages/neuron-wallet/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ export default {
ignore: '忽略并继续',
},
},
'unrecognized-multisig-transaction': {
message: '这是一笔多签交易。请使用对应的钱包在多签地址中批准该交易。',
buttons: {
cancel: '取消',
},
},
},
prompt: {
password: {
Expand Down
13 changes: 9 additions & 4 deletions packages/neuron-wallet/src/services/cells.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export default class CellsService {
(
output.hasData = 0 AND
output.typeHash IS NULL AND
output.lockCodeHash = :multiSignlockCodeHash
output.lockCodeHash in (:...multiSignlockCodeHash)
)
OR
(
Expand Down Expand Up @@ -353,7 +353,7 @@ export default class CellsService {
`,
{
liveStatus: OutputStatus.Live,
multiSignlockCodeHash: SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH,
multiSignlockCodeHash: [SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH, SystemScriptInfo.MULTISIG_CODE_HASH],
chequeLockCodeHash,
nftIssuerCodehash,
nftClassCodehash,
Expand Down Expand Up @@ -467,7 +467,9 @@ export default class CellsService {
data: 'withdraw-able',
})
}
} else if (o.lockCodeHash === SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH) {
} else if (
[SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH, SystemScriptInfo.MULTISIG_CODE_HASH].includes(o.lockCodeHash)
) {
cell.setCustomizedAssetInfo({
lock: CustomizedLock.SingleMultiSign,
type: '',
Expand Down Expand Up @@ -770,7 +772,9 @@ export default class CellsService {
if (inputs.find(el => el.lockHash === cell.lockHash!)) {
totalSize += TransactionSize.emptyWitness()
} else {
if (lockClass.codeHash === SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH) {
if (
[SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH, SystemScriptInfo.MULTISIG_CODE_HASH].includes(lockClass.codeHash)
) {
const multisigConfig = multisigConfigMap[cell.lockHash]
if (!multisigConfig) {
throw new MultisigConfigNeedError()
Expand Down Expand Up @@ -1374,6 +1378,7 @@ export default class CellsService {
case assetAccountInfo.getChequeInfo().codeHash:
return LockScriptCategory.Cheque
case SystemScriptInfo.LEGACY_MULTISIG_CODE_HASH:
case SystemScriptInfo.MULTISIG_CODE_HASH:
if (output.lock.args.length === LOCKTIME_ARGS_LENGTH) {
return LockScriptCategory.MULTI_LOCK_TIME
}
Expand Down
Loading
Loading