iadnan
December 9, 2021, 3:52pm
1
Hello, I need some help regarding solving this error.
I have two transactions, one is signed by logicSign and other is supposed to be signed using WalletConnect.
const txnsToSign = txsToSign.map(txn => {
const encodedTxn = Buffer.from(algosdk.encodeUnsignedTransaction(txn)).toString('base64');
return {
txn: encodedTxn,
};
});
const txnsNotToSign = txsNotToSign.map(txn => {
const encodedTxn = Buffer.from(algosdk.encodeUnsignedTransaction(txn)).toString('base64');
return {
txn: encodedTxn,
signers:[]
};
});
These transaction are sent to
const result = await this.walletConnect.sendCustomRequest(request);
And I receive this error.
Invalid Input: Group transaction does not need to be signed by Wallet user.
Can someone explain what this error means and what am I doing wrong?
Can you provide the full code generating request
?
Can you show the content of request
?
iadnan
December 9, 2021, 4:24pm
3
let requestObj= [];
txnsToSign.forEach(txn => requestObj.push(txn));
txnsNotToSign.forEach(txn => requestObj.push(txn));
requestParams = [requestObj];
const request = formatJsonRpcRequest('algo_signTxn', requestParams);
const result = await this.walletConnect.sendCustomRequest(request);
Content of request are
{
"id": 1639066971443128,
"jsonrpc": "2.0",
"method": "algo_signTxn",
"params": [
[
{
"txn": "iqNhbXTOABcCoKNmZWXNB9CiZnbOARjL3qNnZW6sdGVzdG5ldC12MS4womdoxCBIY7UYpLPITsgQ8i1PEIHLD3HwWaesIN7GL39w5Qk6IqNncnCAomx2zgEYz8ajcmN2xCDJzFnkCzYG1jryZ60AqJL4sobRx1lpSTmZkbq/3U1zEqNzbmTEIC6sZuam53L5EqDOE5vzm1Ptbzy+G93dZhyABDX6wiGSpHR5cGWjcGF5"
},
{
"txn": "jaRhcGFhksQIAAAAAACflz3ECAAAAAADA0rXpGFwYXDFA0oCIAYAAQQFAgMmCwFVAU4BTwFDAUUBQQFCAVMCQk4CU04CQkUxGCISQQAkKDYaABdnKTYaARdnKjIDZys2HAFnJwQyA2cnBSJnJwYiZyNDMQkyAxIxIDIDEhBAAAEAMRkjEkAC3jEZJCUREkABGTEZIQQSQAK/NhoAJwYSQAITNhoAJwcSQAGPN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SzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiKibHbOARjPxqJseMQgOTM3MmI1NjdlZmI3NGY5NThjMGE3NjEwZTdlNmI5YmGjc25kxCDJzFnkCzYG1jryZ60AqJL4sobRx1lpSTmZkbq/3U1zEqR0eXBlpGFwcGw=",
"signers": []
}
]
]
}
I converted to JSON your two transactions using the Algorand software msgpacktool
:
$ base64 -d <<< iqNhbXTOABcCoKNmZWXNB9CiZnbOARjL3qNnZW6sdGVzdG5ldC12MS4womdoxCBIY7UYpLPITsgQ8i1PEIHLD3HwWaesIN7GL39w5Qk6IqNncnCAomx2zgEYz8ajcmN2xCDJzFnkCzYG1jryZ60AqJL4sobRx1lpSTmZkbq/3U1zEqNzbmTEIC6sZuam53L5EqDOE5vzm1Ptbzy+G93dZhyABDX6wiGSpHR5cGWjcGF5 | msgpacktool -d -b32
{
"amt": 1508000,
"fee": 2000,
"fv": 18402270,
"gen": "testnet-v1.0",
"gh:b32": "JBR3KGFEWPEE5SAQ6IWU6EEBZMHXD4CZU6WCBXWGF57XBZIJHIRA====",
"grp": {},
"lv": 18403270,
"rcv:b32": "ZHGFTZALGYDNMOXSM6WQBKES7CZINUOHLFUUSOMZSG5L7XKNOMJA====",
"snd:b32": "F2WGNZVG45ZPSEVAZYJZX443KPWW6PF6DPO52ZQ4QACDL6WCEGJA====",
"type": "pay"
}
$ base64 -d <<< jaRhcGFhksQIAAAAAACflz3ECAAAAAADA0rXpGFwYXDFA0oCIAYAAQQFAgMmCwFVAU4BTwFDAUUBQQFCAVMCQk4CU04CQkUxGCISQQAkKDYaABdnKTYaARdnKjIDZys2HAFnJwQyA2cnBSJnJwYiZyNDMQkyAxIxIDIDEhBAAAEAMRkjEkAC3jEZJCUREkABGTEZIQQSQAK/NhoAJwYSQAITNhoAJwcSQAGPNhoAJwgSQAD4NhoAJwkSQACBNhoAKxJAAGE2GgAnChJAAAEAJwVkIhMqZDIDExBAAAEAIicGYiITQQAGJwYnBWRnMwEHJwRkEjMCAC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IAE4CTMGQBC5TTEBBBAUJECAARGMBAAJYEMQJEAAABAAVDEA3HENBSOBLEEIJUAAABAARUGIRHAZRDKAJSAQQQIESBAAXTGAIUE4CGIERTAEADGAAACIIDGAIQEQJBAMYBCEUGIEQQIAAACABCE4DCEJYGMIZQCEQIMYRTKABSAQQQKESBAAUDGAQAE4CGIERTAEDSOBDECIIDGAQSEIJRAQAAAEACEJYGEITQMYRTAIJASZRDGUADIABDCJAAAAIAEITQMYRCCM2ACIQSCBAQACBHAYTQMZBDBBTSEJYGMIRBENABEIJRAQIABATQMJYGMQRQSZZDIMRCOBTCEIJEAAABAARUGISDEITQMITGENBQ====",
"apat": [
"Lqxm5qbncvkSoM4Tm/ObU+1vPL4b3d1mHIAENfrCIZI="
],
"apgs": {
"nbs": 3,
"nui": 4
},
"apls": {
"nui": 1
},
"apsu:b32": "AIQACABGAEAUEIRIEJTA====",
"fv": 18402270,
"gen": "testnet-v1.0",
"gh:b32": "JBR3KGFEWPEE5SAQ6IWU6EEBZMHXD4CZU6WCBXWGF57XBZIJHIRA====",
"lv": 18403270,
"lx:b32": "HEZTOMTCGU3DOZLGMI3TIZRZGU4GGMDBG43DCMDFG5STMYRZMJQQ====",
"snd:b32": "ZHGFTZALGYDNMOXSM6WQBKES7CZINUOHLFUUSOMZSG5L7XKNOMJA====",
"type": "appl"
}
As you can see the first transaction has "grp": {}
, which is not authorized, while the second transaction has not "grp"
.
This means you have an issue in the way you assigned the group ID.
Did you follow Atomic transfers - Algorand Developer Portal ?
iadnan
December 9, 2021, 4:36pm
5
Thank you so much,
I was assigning groupID in the wrong way