0

I'm trying to send a transaction from my react frontend to local chain, I have signed in wax cloud wallet and made a transaction. But at last I met this signature error.

"Message: transaction declares authority '{"actor":"mywarm.wam","permission":"active"}', but does not have signatures for it."

I found that it is because the private key supplied to the signature provider is incorrect for the actor in which the transaction is being signed for. but I can't find the way to fix this

Frontend Code

import './App.css';
import { useState, useEffect } from 'react';
import * as waxjs from "@waxio/waxjs/dist";
// import SignatureProvider from 'eosjs-ledger-signature-provider';

function App() {

  const [wax, setWax] = useState('');
  const [signedAccount, setSignedAccount] = useState('');
  const [response, setResponse] = useState('');
  const [message, setMessage] = useState('');
  // const signatureProvider = new SignatureProvider()
  
  useEffect(() => {
    const wax = new waxjs.WaxJS({
      rpcEndpoint: 'http://127.0.0.1:8888'
    });
    setWax(wax);
  }, [])

  const login = async () => {
    try {
      const userAccount = await wax.login();
      setSignedAccount(userAccount);
    } catch(e) {
      setResponse(e.message);
    }
  }

  const create = async () => {
    if(!wax.api) {
      setResponse('* Login first *');
    }

    try {
      const result = await wax.api.transact({
        actions: [{
          account: 'armyassets',
          name: 'createcol',
          authorization: [{
            actor: wax.userAccount,
            permission: 'active',
          }],
          data: {
            author: wax.userAccount,
            collection_name: "bbcollection",
            allow_notify: true,
            authorized_accounts: wax.userAccount,
            notify_accounts: wax.userAccount,
            market_fee: 0.1,
            data: [{
              key:"name",
              value:["string","bbcollection"],
            }],
          },
        }]
      }, {
        // signatures: [signatureProvider],
        blocksBehind: 3,
        expireSeconds: 1200
      });
      setMessage(JSON.stringify(result));
      await new Promise(resolve => setTimeout(resolve, 1000));
      // await getCurrentMessage();
    } catch(e) {
      setMessage(e.message);
    }
  }

  return (
    <div className="App">
      <header className="App-header">
          This is the test app for wax blockchain
      </header>
      <div className="App-content">
        <div className="App-button">
          <button onClick={login} className="login-btn">Login</button>
          <button onClick={create} className="sign-button">Create NFT</button>
        </div>
        <div className="App-account">
          <div>Signed User : </div>
          <div className="App-account-content">{signedAccount}</div>
        </div>    
      </div>
      <div className="App-response">
        Response: {response}
      </div>
      <div className="App-response">
        Message: {message}
      </div>
    </div>
  );
}

export default App;

I have referenced this articles, but I still didn't find the solution.
transaction declares authority '{"actor":"mymultisig11","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms
Transaction requires authority, but does not have signatures for it

I have used development private key for eos on eos studio and deployed my smart contract code to local test net. And I signed in with my wax wallet account on my frontend, so the error might occur, I guess.
I also tried to make a transaction by using default actor on eos studio, but the same error appears.

 authorization: [{
            actor: "armyassets", //this is default actor on eos studio
            // actor: wax.userAccount,
            permission: 'active',
          }]

Please recommend any possible ways to deal with this.
Best Regards

1
  • I really think these guys just sabotages stuff so it goes bad every time I put a decent amount of money on one of my wax wallets it goes missing and every time I want to enjoy myself I can't make a signature and they refuse to help Oct 10 at 22:18

1 Answer 1

0

The wax cloud wallet supports WAX chain. It'll not work with any other blockchain.

1
  • Hi, @MatthewDarwin, thanks. Yes, you are right. I heard of that just before. Someone recommend to use scatter for local test.. did you have experience in using it? I have read some articles to use scatter, but I didn't find clear one.. even when I tested it, it doesn't work well, Can you help me with scatter? Aug 9, 2021 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.