-
Notifications
You must be signed in to change notification settings - Fork 646
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
feat: Use new cross chain transaction payload action #2167
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…t/use-new-cross-chain-transaction-payload
webapp/src/config/env/dev.json
Outdated
@@ -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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
webapp/src/modules/item/actions.ts
Outdated
@@ -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' |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it!
webapp/src/modules/item/sagas.ts
Outdated
function* handleBuyItemCrossChain(action: BuyItemCrossChainRequestAction) { | ||
const { item, route, order } = action.payload | ||
try { | ||
console.log('Buying item cross chain') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("Getting MANA") | |
onGetMana() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
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.