ubiquity / pay.ubq.fi

Generate and claim spender permits (EIP-2612)
https://pay.ubq.fi
10 stars 41 forks source link

Network switching bug #285

Closed Keyrxng closed 1 month ago

Keyrxng commented 2 months ago

Requires https://github.com/ubiquity/pay.ubq.fi/pull/274

When attempting to claim a permit from a different network you receive a prompt to change network but you must refresh the page in order to successfully claim it. Once refreshed it goes through fine.

There are error logs regarding underlying network changed and the ethers transaction error.

I'm unsure off the top of my head what the solution for it would be without further debugging.

time: 2-4 hours
whck6 commented 1 month ago

/start

ubiquity-os[bot] commented 1 month ago
DeadlineSun, Sep 8, 8:05 PM UTC
Registered Wallet 0x1133830C73B2251DB9373e1B668D01E9dd2B99B1
Tips:
<ul>
<li>Use <code>/wallet 0x0000...0000</code> if you want to update your registered payment wallet address.</li>
<li>Be sure to open a draft pull request as soon as possible to communicate updates on your progress.</li>
<li>Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.</li>
<ul>
ubiquity-os[bot] commented 1 month ago

@whck6, this task has been idle for a while. Please provide an update.

0x4007 commented 1 month ago

@whck6, this task has been idle for a while. Please provide an update.

@Keyrxng looks like you need to handle something related to the pull so this can get merged

Keyrxng commented 1 month ago

So the required PR (https://github.com/ubiquity/pay.ubq.fi/pull/274) was merged and reverted because of changes required which seemingly are only minor-mid CSS issues as far as I can gather.

Due to this, either @pbkompasz must add the final tweaks and address the issue and/or they are addressed by someone else before this is merged.

This task PR comes with no QA or anything, it's an assumption at this point whether it would work or not.


I could test it inside https://github.com/ubiquity/pay.ubq.fi/pull/274 I guess but it didn't seem right because if that PR wasn't accepted then this task would be closed as not planned as it's a non-issue until multi-network permits. So I'm not certain how or what to push through at the moment, I feel that it rests on whether #274 is fixed and merged.

0x4007 commented 1 month ago

What does multi permit support have to do with this problem

Keyrxng commented 1 month ago

What does multi permit support have to do with this problem

The problem only exists because the single Web3Provider needs to change network without recreating or properly "flushing" the ethers.provider class. It's a non-issue on development because we mint single permits and they are single networked at this point too.

This task aims to resolve an issue directly tied to multi-network permits because it is those that are intermittently unclaimable without a page refresh, development is fine and has no such issues because we operate on one network at any one time.

0x4007 commented 1 month ago

Well we can certainly merge it anyways it doesn't matter what order its merged in. If you need to test you can just pull both in on your own branch and try.

Keyrxng commented 1 month ago

Well we can certainly merge it anyways it doesn't matter what order its merged in.

Understood then, I'll review now.

ubiquity-os[bot] commented 1 month ago

@whck6, this task has been idle for a while. Please provide an update.

whck6 commented 1 month ago

/stop

0x4007 commented 1 month ago

/stop

I think this capability is broken right now!