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

feat: Use new cross chain transaction payload action #2167

Merged
merged 7 commits into from
Mar 11, 2024

Conversation

LautaroPetaccio
Copy link
Contributor

@LautaroPetaccio LautaroPetaccio commented Mar 5, 2024

This PR uses the new version of the transactions module, which fetches and waits for pending cross chain transactions.
It removes all the logic created to work with cross chain transactions once they were launched.

Copy link

vercel bot commented Mar 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marketplace ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2024 1:11pm

@coveralls
Copy link

coveralls commented Mar 7, 2024

Coverage Status

coverage: 66.16% (-0.08%) from 66.242%
when pulling f52dce4 on feat/use-new-cross-chain-transaction-payload
into 8b84966 on master.

@@ -44,6 +44,7 @@
"SUBGRAPH_WORKER": "https://subgraph.decentraland.zone",
"SENTRY_DSN": "https://1dc401149e1c819b8477565c9cdd9b70@o4504361728212992.ingest.sentry.io/4505743351676928",
"SQUID_API_URL": "https://testnet.v2.api.squidrouter.com/",
"SQUID_RETRY_DELAY": "3000",
Copy link
Contributor

Choose a reason for hiding this comment

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

3 seconds might be too much, can we use 1 or 2? wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! Changed it to 2 secs.

@@ -114,7 +115,7 @@ export type BuyItemSuccessAction = ReturnType<typeof buyItemSuccess>
export type BuyItemFailureAction = ReturnType<typeof buyItemFailure>

// Buy Item Cross Chain
export const TRACK_CROSS_CHAIN_TX_REQUEST = '[Request] Track Buy item cross-chain tx'
// export const TRACK_CROSS_CHAIN_TX_REQUEST = '[Request] Track Buy item cross-chain tx'
Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove this comment since we don't need it anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it!

function* handleBuyItemCrossChain(action: BuyItemCrossChainRequestAction) {
const { item, route, order } = action.payload
try {
console.log('Buying item cross chain')
Copy link
Contributor

Choose a reason for hiding this comment

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

whoops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it!

@@ -378,7 +378,9 @@ export const BuyWithCryptoModal = (props: Props) => {
data-testid={GET_MANA_BUTTON_TEST_ID}
loading={isFetchingBalance || isBuyingAsset}
onClick={() => {
onGetMana()
// onGetMana()
console.log("Getting MANA")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log("Getting MANA")
onGetMana()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the function by removing the console log, the call to buy an item and adding the onGetMana call again.

Copy link
Contributor

@juanmahidalgo juanmahidalgo left a comment

Choose a reason for hiding this comment

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

LGTM!!

@LautaroPetaccio LautaroPetaccio merged commit a2ca82b into master Mar 11, 2024
7 checks passed
@LautaroPetaccio LautaroPetaccio deleted the feat/use-new-cross-chain-transaction-payload branch March 11, 2024 15:30
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

3 participants