Reputation: 1408
Can somebody explain why i got this error ? I use this plugin https://github.com/broxus/everscale-inpage-provider
when I use this script
public async getEverWalletTransaction(
recipient: string,
price: any,
payload: any,
): Promise<string> {
console.log(this.wallet.address);
console.log(recipient);
console.log(price.toString());
console.log(payload);
const { transaction } = await this.ton.rawApi.sendMessage({
sender: this.wallet.address,
recipient,
amount: price.toString(),
bounce: true,
payload,
});
return transaction.id.hash;
}
Upvotes: 0
Views: 117
Reputation: 82
I think the issue is from you recipient parameter. here is the working code :
// Import the library
import { ProviderRpcClient, Address } from "everscale-inpage-provider";
// Initialize new provider
const provider = new ProviderRpcClient();
// Send message like this
await provider.sendMessage({
sender: new Address("<YOUR_ADDRESS_STRING>"), // e.g. 0:000...000
recipient: new Address("<YOUR_ADDRESS_STRING>"),
amount: "100000000", // 0.1 Ever
// payload: "" as any,
bounce: true,
// stateInit: "",
});
Please find below the transaction hash associated with the aforementioned script:
https://everscan.io/transactions/f9cc7b214fa74c29fda572fe394e5000981cc232bfdfcb790bb520b9a945e4fe
Upvotes: 0