Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix speed up/cancel transaction #1413

Conversation

greg-schrammel
Copy link
Contributor

@greg-schrammel greg-schrammel commented Mar 18, 2024

Fixes BX-####
Figma link (if any):

What changed (plus any additional context for devs)

  • fixes the activity tab while speeding up/cancelling a transaction
  • fixes the crash when trying to speed up

Screen recordings / screenshots

What to test

try to speed up and cancel a transaction

Copy link

linear bot commented Mar 18, 2024

@greg-schrammel greg-schrammel marked this pull request as draft March 18, 2024 17:27
Copy link

Here's the packed extension for this build:
rainbowbx-fbd67dd1fdb5dca673743f208441fb2ffdc4fb0f.zip

@greg-schrammel greg-schrammel force-pushed the gregs/bx-1327-speed-up-tx-rejected-by-rpc-for-0-gas-extension-crash-on branch from 60e651c to 220acdd Compare March 21, 2024 14:54
@greg-schrammel greg-schrammel changed the title Fix a bunch of weird bugs in activity details, speed up and gas settings Fix gas settings, speed ups, gas modals UIs and enable L2 custom settings Mar 21, 2024
@greg-schrammel greg-schrammel force-pushed the gregs/bx-1327-speed-up-tx-rejected-by-rpc-for-0-gas-extension-crash-on branch from 220acdd to 8d35099 Compare March 25, 2024 05:27
@greg-schrammel greg-schrammel changed the base branch from master to pending-tx-fixes March 27, 2024 09:18
Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-87979f617b5a555863f7c00493d0986274537524.zip
screenshots

@greg-schrammel greg-schrammel changed the title Fix gas settings, speed ups, gas modals UIs and enable L2 custom settings Fix gas settings, speed ups and gas modals UIs Mar 28, 2024
Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-c6f327e8afc1418f49d3479f3aaac8c99dea5934.zip

@greg-schrammel greg-schrammel changed the title Fix gas settings, speed ups and gas modals UIs Polish UI of gas settings and speed ups Mar 28, 2024
Copy link

Here's the packed extension for this build:
rainbowbx-4653ff68e00cbf9555cc53cf1eff4feeacd5d72b.zip

@greg-schrammel greg-schrammel force-pushed the gregs/bx-1327-speed-up-tx-rejected-by-rpc-for-0-gas-extension-crash-on branch from 0a91cf7 to 4882311 Compare April 10, 2024 04:11
Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-184ca905bd39c409a597642fab582bdbd13ab846.zip

…p-tx-rejected-by-rpc-for-0-gas-extension-crash-on
}
};

function deserializeBigNumbers<T>(obj: T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure about this solution, open to suggestions
but walletAction bridges to the background worker and back, in this back and forth it serializes BigNumbers as { type: 'BigNumber', _hex: "0x..." }
so sometimes we got an [object Object] instead of the bignumber in some places

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes i've seen this, maybe let's just use hex strings? only sending hex from popup to background and only sending hex from background to popup so we don't have to do this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to do it and got afraid of changing the type and breaking in unexpected places, because it's being casted as TransactionResponse and that is why we didn't caught it for so long to begin with
to do it without changing the type, I'd have to then deserialize by hand like

return {
 ...response,
 maxBaseFee: BigNumber.from(response.maxBaseFee)
 ...
}

which is more error prone and effort

another idea is to do this generic BigNumber deserialization inside walletAction so we don't have to ever think about it again in other places

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okok sounds good, can we move this to a util file somewhere else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

}}
title="Failed to speed up transaction"
description={[
'A speed up can fail when the state of the network changed since you first submitted the transaction',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielSinclair let's define a copy for this and I add to the translations

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@greg-schrammel Some copy:

"Speed up failed"

"Attempts to speed up a transaction can fail during network congestion, gas limit increases, or when the original transaction is confirmed first"

@greg-schrammel greg-schrammel marked this pull request as ready for review April 22, 2024 17:50
@greg-schrammel greg-schrammel changed the title Polish UI of gas settings and speed ups fix speed up/cancel transaction Apr 22, 2024
Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-c804aedd590d8c4123c02379ec49926726b8170f.zip

@estebanmino
Copy link
Member

bumping this small comment #1413 (comment)

Copy link
Member

@derHowie derHowie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Copy link

Here's the packed extension for this build:
rainbowbx-0197b240b0393f353d2cfc11ca396312f810c418.zip

@greg-schrammel greg-schrammel added this pull request to the merge queue Apr 30, 2024
Copy link

Here's the packed extension for this build:
rainbowbx-ea2bd90db814cfbabb3fba83f57e32f00ee025ec.zip

Merged via the queue into master with commit eb8f5d3 Apr 30, 2024
17 checks passed
@greg-schrammel greg-schrammel deleted the gregs/bx-1327-speed-up-tx-rejected-by-rpc-for-0-gas-extension-crash-on branch April 30, 2024 00:52
Copy link

Here's the packed extension for this build:
rainbowbx-eb8f5d31879858387db7ee784d9e8bc65b8a2c27.zip

magiziz added a commit that referenced this pull request Apr 30, 2024
Co-authored-by: Esteban Miño <[email protected]>
Co-authored-by: Daniel Sinclair <[email protected]>
Co-authored-by: brdy <[email protected]>
Co-authored-by: brunobar79 <[email protected]>
Co-authored-by: MK <[email protected]>
Co-authored-by: Magomed Khamidov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants