Comments (13)
@FrancescoGrazioso Could you provide a screenshot of the console after clicking "Approve" in the demo wallet? It should display "SUCCESS" after a few moments, or throw an error if execution failed.
from hashconnect.
Or - this could be happening because the token you are trying to transfer is not associated to the demo account
from hashconnect.
The transaction to associate the token to the wallet account has the same problem, i'll attach the console on the approving transaction.
The problem is the same, i got no response from the event handler and the console/wallet do not display any "SUCCESS" message.
The following is the code that i'm using to approve the transaction
`
export async function associateTokenWithAccount(token, accountId) {
const client = hederaClient();
let transaction = await new TokenAssociateTransaction();
transaction.setAccountId(accountId);
transaction.setTokenIds([token.tokenId]);
transaction.freezeWith(client);
await sendTransaction(transaction, accountId);
}
`
`
export async function sendTransaction(tx: Transaction, signignAccount: string) {
let transactionBytes: Uint8Array = tx.toBytes();
const transaction: MessageTypes.Transaction = {
topic: saveData.topic,
byteArray: transactionBytes,
metadata: {
accountToSign: signignAccount,
returnTransaction: false
}
}
await hashconnect.sendTransaction(saveData.topic, transaction)
hashconnect.transactionResponseEvent.once((data) => {
console.log("transaction response", data)
})
`
from hashconnect.
Yes so the demo wallet doesn't support the token associate function yet - it's still very much a WIP but I will prioritze adding token association.
Your events are going through fine, the wallet just doesn't have the UI to handle it yet!
from hashconnect.
Ok thanks, i'll close the issue when you'll release the new version of the wallet
from hashconnect.
Sounds good - I'll tag you when its ready :)
from hashconnect.
@FrancescoGrazioso I've updated the demo wallet to support token associate/disassociate
from hashconnect.
Keep an eye on the console when using it - errors such as "TOKEN_ALREADY_ASSOCIATED" aren't handled by the demo wallet yet
from hashconnect.
Still nothing from the console, on every transaction i try.
I tried:
- token association
- token dissociation
- token transfert
from hashconnect.
Hmmm that looks to me like it should work - can you reach out to me (pluto) on discord?
from hashconnect.
There was a bug in the demo where errors werent returning correctly - if you try now both the success and error transaction response events should fire - here is the log from the demo dapp, you can see both transaction responses there!
from hashconnect.
It is giving me now the following error
I reached you on discord
from hashconnect.
The problem was in the way i was freezing the transaction, with the new code it works!
from hashconnect.
Related Issues (20)
- React Demo is using outdated version - Example app also uses outdated version HOT 1
- any one Help me what is this issuer??? HOT 1
- Login using ECDSA key in Hashpack
- Relay can receive non-JSON messages but does not handle them gracefully
- Excessive 'Failed to parse source map' Warnings HOT 1
- lack of documentation
- Decryption error when connecting wallet. HOT 4
- Issue signing data. Approve button not working HOT 1
- Wallet Agnostic option HOT 1
- Property 'signTransaction' does not exist on type 'TransferTransaction' HOT 1
- Can't build the project because of nodejs dependencies HOT 1
- Error: Cannot find module "crypto" with Next.js 14 and Node 20.10.0 HOT 1
- TypeError: bufferUtil.mask is not a function
- The chrome extension is not injected into iframes
- HashConnect signTransaction returns wrong signature
- HashConnect signTransaction returns wrong signature
- getRecord bug : body.data was not set in the protobuf.
- Hashpack Wallet is unable to connect on mobile devices.
- Build Fails with @hashgraph/sdk and hashconnect in Next.js TypeScript Project HOT 1
- Error: No matching key. history: 1716990896575755 for AccountAllowanceApproveTransaction HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashconnect.