You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This functionality is pending implementation in E@.
With the old client, I was able to have a paid entrance to a building. If I interact with a button, Metamask opens up to accept a tx, once the tx is approved the door opens in my scene.
With the new client, with the same code I can get Metamask to open, but then if I accept the tx nothing happens.
Scenes use the sendAsync method. Currently that method is failing here:
Several scenes use this library to simplify the use of blockchain functionality. Meaning creators will rarely use the sendAsync directly in their code, but it gets used implicitly: https://github.com/decentraland/dcl-crypto-toolkit
With that library, you should be able to use the following statement to send MANA to an address. The callback in the then() statement is executed once after the tx is mined and added to a block in the blockchain.
import{executeTask}from'@dcl/sdk/ecs'import*ascryptofrom'dcl-crypto-toolkit'consttestAddressTarget='0x04812c531083054863ef354EF600A61857921466'exportfunctionmain(){executeTask(async()=>{constbalance=awaitcrypto.mana.balance(testAddressTarget)console.log('First Mana balance:',balance)try{awaitcrypto.mana.send(testAddressTarget,10,false)console.log('Mana sent successfully!')}catch(e){console.log(e)}finally{try{constbalance=awaitcrypto.mana.balance(testAddressTarget)console.log('Then Mana balance:',balance)}catch(e){console.log(e)}}})}[10:02](https://decentralandteam.slack.com/archives/C01QVR7TJK1/p1731416526211729?thread_ts=1731413337.269199&cid=C01QVR7TJK1)
Misha mentions that the following API could maybe be useful, but this needs research:
[PublicAPI("Used by StreamingAssets/Js/Modules/EthereumController.js")]
public object TryPay(decimal amount, string currency, string toAddress)
{
//TODO no payments yet
return new SendEthereumMessageResponse
{ jsonAnyResponse = "{}" };
}
Run npm i and npm run start -- --explorer-alpha to run in preview
Click on the button, accept the tx in the UI. Metamask will open on your browser to confirm the transaction. After you do, the door would open on the Web explorer, not on the E@
📔 Issue Description:
This functionality is pending implementation in E@.
With the old client, I was able to have a paid entrance to a building. If I interact with a button, Metamask opens up to accept a tx, once the tx is approved the door opens in my scene.
With the new client, with the same code I can get Metamask to open, but then if I accept the tx nothing happens.
Scenes use the
sendAsync
method. Currently that method is failing here:Several scenes use this library to simplify the use of blockchain functionality. Meaning creators will rarely use the sendAsync directly in their code, but it gets used implicitly:
https://github.com/decentraland/dcl-crypto-toolkit
With that library, you should be able to use the following statement to send MANA to an address. The callback in the
then()
statement is executed once after the tx is mined and added to a block in the blockchain.This approach should also work:
Misha mentions that the following API could maybe be useful, but this needs research:
STR:
https://github.com/koshimazaki/sdk7-goerli-plaza/tree/main/Paid-Button
npm i
andnpm run start -- --explorer-alpha
to run in previewTIP: When opening the explorer use the following to connect the explorer to the testnet and avoid sending real money while testing the scene. You will need to own MANA on Sepolia:
decentraland://realm=http://127.0.0.1:8000&local-scene=true&debug=true&dclenv=zone&position=0,0
✔️ Expected Result:
The door should open. This is how it behaves on the Web explorer.
❌ Actual Result with evidence:
The transaction completes and nothing happens. No communication comes back from Metamask to the Explorer.
➗ Repro Index:
100%, the functionality is pending implementation.
🖥️ Operative system and additional Notes:
This happens on all operating systems
The text was updated successfully, but these errors were encountered: