Skip to content

Wrong cosigner when converting account to multisig account #245

@kahwooi

Description

@kahwooi

I am following this https://nemtech.github.io/guides/account/converting-an-account-to-multisig.html to convert an account to a multisig account.

The transaction is announce successfully, but the wired part is at the Cosign the AggregateTransaction .

I am expecting Alice and Bob to consign the aggregate transaction, but non of them receive the aggregateBondedTransactions.

When I try to use the multisig account to consign it, and it did go through successfully. I am confuse.

This is how I cosign the aggregate transaction, and using multisig account went through:

accountHttp
    .aggregateBondedTransactions(multisigAccount.publicAccount, new QueryParams(100))
    .pipe(
        mergeMap((_) => _),
        filter((_) => _.transactionInfo !== undefined && _.transactionInfo.hash !== undefined &&
            _.transactionInfo.hash === hash), // Filter transaction
        toArray(),
    )
    .subscribe((transactions: AggregateTransaction[]) => {
        console.log(transactions.length)
        if (transactions.length) {
            const transaction = transactions[0];
            const cosignatureTransaction = CosignatureTransaction.create(transaction);
            const signedCosignature = multisigAccount.signCosignatureTransaction(cosignatureTransaction);

            transactionHttp.announceAggregateBondedCosignature(signedCosignature).subscribe(
                () => {
                    console.log('Transaction cosigned and announced correctly');
                }, (err) => {
                    console.log(err.response !== undefined ? err.response.text : err);
                });

        }
    });

I am using below:
"nem2-sdk": "^0.13.1"
"catapult-server":"v0.5.0.1"


Related issue:

After signed by multisig account, I try to getMultisigAccountInfo:

accountHttp
.getMultisigAccountInfo(address)
.subscribe(accountInfo => console.log(accountInfo), err => console.error(err));

I get an error and undefined result:

body: MultisigAccountInfoDTO { multisig: undefined } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions