-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello,
I'm currently trying to integrate adena sdk to our product but I facing problems while trying to broadcast transaction.
Problem
try {
const account = await adena.getAccount();
console.log(account.data?.accountNumber, account.data?.sequence);
const tx = TransactionBuilder.create()
.messages(
makeMsgCallMessage({
caller: address,
send: '',
pkg_path: proposal.path,
func: 'MustVoteOnProposalSimple',
args: [proposal.id, vote],
max_deposit: '',
}),
)
.memo('')
.build();
const signedResponse = await adena.signTransaction({ tx });
console.log("signedResponse",JSON.stringify(signedResponse));
const txHash = await adena.broadcastTransaction({ tx });
console.log(JSON.stringify(txHash));
} catch (err) {
addToast({ title: 'Error', message: String((err as any)?.message ?? err), mode: 'negative' });
}When doing this I'm getting the following response:
Sign OK
{"code":0,"status":"success","type":"SIGN_TX","message":"Sign Transaction","data":{"encodedTransaction":"Cm4KCi92bS5tX2NhbGwSYAooZzFlajNmcnA2eThrenkzYXNxeWxsMmYyNmpxNmVoeTgwdjI2c21hZCISZ25vLmxhbmQvci9nb3YvZGFvKhhNdXN0Vm90ZU9uUHJvcG9zYWxTaW1wbGUyATEyA1lFUxIQCPj2tAUSCTU2Nzd1Z25vdBp+CjoKEy90bS5QdWJLZXlTZWNwMjU2azESIwohA/9fJb9lER6oe8v0FkX+SodwmN9FgxtWnAcBuLI45IOHEkCkxt0E8WKjfcuMZrNapzonAFWu30lE//5f26fva4F0mmIsgRxZJhsBpGXqBGHbutPiTv9waNJAX7Ynld7fobME"}}// Broadcast KO
{
"code":4001,
"status":"failure",
"type":"TRANSACTION_FAILED",
"message":"Adena could not execute the transaction.",
"data":{
"hash":"mXPDxdovq5KJm9jHAjyfi+YkKAdYwN8U8oibO14Rx6o=",
"error":"Error: signature is unauthorized"
}
}Verifications:
- Adena seems well configured on my local network: I can see my balance without problems:
- When I try to sign the transaction there is the adena window that opens and simulates the transaction without problems: The storage Deposit and Network fee updates without problem:
I tried to make a simple transaction on my local gnoweb to register my namespace but the result is the same, window pops up but nothing after that, same error message.
TLDR
Is there some hack or something neccessary to have adena fully operative when working on localhost ?
I also saw while testing on local gnoweb:
content.js:2 HEAD https://127.0.0.1:26657/ net::ERR_SSL_PROTOCOL_ERROR
{status: 'failure', data: {…}, code: 4001, message: 'Adena could not execute the transaction.', type: 'TRANSACTION_FAILED'}Maybe adena enfonces https ?
jinoosss
Metadata
Metadata
Assignees
Labels
No labels