Giter VIP home page Giter VIP logo

widgets's People

Contributors

albertfolch-redeemeum avatar levalleux-ludo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

widgets's Issues

unable to redeem with WalletConnect

  • connection to the widget: OK
  • deliveryInfo signature (woocommerce mode): OK
  • XMTP chat authentication (dApp mode): OK
  • redeemVoucher meta-tx signature: NOK

An HTTP network error can be seen in the console logs:
POST https://matic-mumbai.chainstacklabs.com/ net::ERR_CONNECTION_TIMED_OUT

NOTE: it's working inside the dApp (where the web3 provider is handle by the dApp), but failing in the standalone hosted widget or in woocommerce integration

widget can be connected to a different wallet than the dApp that integrates it, leading to user confusion

As a solution, I propose:

  • when connecting the wallet to the dApp, the dApp forces the widget to connect as well, so that, even if the user has to connect twice, this will happen in a sequence at the same time
  • when loading the widget, the dApp sends the current connected account (if any) so that the widget can check if it's connected to the same account. If not, it forces the user to reconnect with the same account as the dApp

allow integrate the redemption widget in the dApp

  • when clicking Redeem on the exchange card -> Redeem the item through the widget (no step "My Items" + no step "Exchange Details")
  • when clicking Cancel on the exchange card -> Cancel the item through the widget (directly to the Cancellation View)
  • when clicking Redeem on the exchange details -> Redeem the item through the widget
  • when clicking Cancel on the exchange details -> Cancel the item through the widget

redemption widget - update chat-sdk / XMTP version

Redemption of an exchange from offer ID 323 (testing env) is failing.
The error comes from the XMTP layer, when trying to send the message to the seller (ID 110).
The issue is not happening when committing other offers from other sellers.
It may be due to an inconsistent version of chat-sdk used by the redemption widget compared to the dApp.

redemption widget - reinitialize the redeem modal steps when switching wallet

  • connect a wallet
  • click Redeem
  • select an exchange X
  • disconnect Wallet --> the popup refresh asking to connect the wallet (OK)
  • connect with another wallet --> the popup refresh on the same exchange X (that does not belongs to the new wallet) (NOK)

Instead of keeping the same exchange details page, in case the wallet has changed, reinitialize the wizard step

reconsider use of email or XMTP preference for the redemption info

At the moment, the redeem widget code suggests the email to be required only when the contact preference of the seller is set to "xmtp_and_email".
If the contact preference is "xmtp", the email is asked but not required.

However, the current implementation fails in doing that in most case.
The following PR bosonprotocol/core-components#642 forces the email to be always required.

This issue is opened to raise that point and reconsider whether or not we want to achieve the initially expected behaviour

redemption widget - verify seller signature with assistant wallet instead of admin one

the signature needs to be created by the assistant wallet, not the admin one. This is because admin wallet may be multi-sig wallets, that can't really sign a message (Gnosis Safe implements a workaround to simulate such a signature, but such a solution would require to adapt our implementation in both the widget and the WC plugin, and will complexify the user flows). In addition, future version of WC plugin with Boson Enterprise will need such a signature that will be more easily implemented with the assistant wallet (owned by BE) than the admin one.

Disconnect button is failing

After the wallet is connected, I click Disconnect and the following error appears in the logs:

chunk-LAFZBYO7.js:642 Uncaught (in promise) Error: No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config
    at hU (chunk-LAFZBYO7.js:642:11)
    at chunk-LAFZBYO7.js:681:19
    at useDisconnect.ts:15:11
    at Object.De (react-dom.production.min.js:54:317)
    at je (react-dom.production.min.js:54:471)
    at react-dom.production.min.js:55:35
    at Br (react-dom.production.min.js:105:68)
    at Lr (react-dom.production.min.js:106:380)
    at react-dom.production.min.js:117:104
    at cu (react-dom.production.min.js:274:42)

image

[woocommerce] add widget parameters to allow several usecases

  • When showing the widget, it must be possible to show the redemption overview (1st page) or not.
  • When an exchangeId is set, it must be possible to directly show:
    • the exchange details page (then the user can select an action depending on the exchange state)
    • or, the redeem form (assuming the exchange is in Committed state)
    • or, the cancel form (assuming the exchange is in Committed state)
    • or, the redeem confirmation form (delivery info is already known and only the redeem transaction will be sent)
  • When showing the list of exchanges, it must be possible to preselect:
    • committed exchanges (default behaviour)
    • or, redeemed exchanges (useful when the buyer wants to raise a dispute on an exchange)
    • or, disputed exchanges (reserve)
    • or, completed exchanges (reserve)

[woocommerce] define several callback URL at the different steps of redemption process

At the moment, there is a callback URL call when the delivery information is submitted
We need another call after the redeem transaction is submitted and another when the redeem transaction is confirmed.
In addition, we need these calls to handle the possible errors, like:

  • an error occurred in the backend when the delivery info is submitted --> the widget needs to show an error occurred and shall not continue with the redemption step
  • an error occurred when the transaction is submitted --> the error is sent to the backend, instead of the submitted transaction
  • the transaction is reverted --> the error is sent to the backend, instead of the transaction confirmation

Subgraph endpoint update required

Hey team,

We've noticed that you're referencing a subgraph deployed on The Graph's hosted service in this repository. Just a heads-up: after June 12th, hosted service subgraph endpoints will no longer be available as the offering is being deprecated.

If you are the subgraph owner or maintainer, it's time to upgrade your subgraph to the network. This ensures everything keeps running smoothly and you get access to all the latest features and improvements. Here is a quick guide with all the upgrade steps.

If you're not the subgraph owner or maintainer, check Graph Explorer to see if the subgraph development team has already upgraded to the network. If you don’t find an upgraded subgraph, a friendly nudge to the subgraph development team would be greatly appreciated—it's a quick process that benefits everyone. Here's the upgrade guide with all the necessary steps for the subgraph development team.

Once the subgraph is upgraded to the network, you can create an API key and updated query URL in Subgraph Studio then update this repository to query from the new endpoint, https://api.studio.thegraph.com/query/<ID>/<SUBGRAPH_NAME>/<VERSION>

Need more support or have more questions? Feel free to reach out to [email protected]. We're here to help!

Cheers,

Paka

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.