Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ tsconfig.tsbuildinfo

# Local Netlify folder
.netlify
.vscode
.ignore
.yalc
yalc.lock
Expand Down
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.requireConfig": true,
"workbench.colorCustomizations": {
"activityBar.background": "#02072d",
"titleBar.activeBackground": "#000285",
"titleBar.activeForeground": "#dae6f9"
}
}
23 changes: 11 additions & 12 deletions src/hooks/useConfirmTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,17 @@ const useConfirmTransaction = (props: Props): ReturnProps => {
);
}

const [sdkRoute, receipt] = await config.routes
.get(route)
.send(
sourceToken,
amount,
sourceChain,
signer,
destChain,
receivingWallet.address,
destToken,
{ nativeGas: toNativeToken },
);
const [sdkRoute, receipt] = await config.routes.execute(
route,
sourceToken,
amount,
sourceChain,
signer,
destChain,
receivingWallet.address,
destToken,
{ nativeGas: toNativeToken },
);

// Clear cached balances on sending chain
clearBalanceCache(sendingWallet, sourceChain);
Expand Down
5 changes: 4 additions & 1 deletion src/hooks/useFetchQuotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ export default (routes: string[], params: Params): HookReturn => {
return;
}

const nextExpiry = config.routes.quoteCache.nextExpiry(routes, rParams);
const nextExpiry = config.routes.quoteMetadataCache.nextExpiry(
routes,
rParams,
);

if (!nextExpiry) {
return;
Expand Down
8 changes: 5 additions & 3 deletions src/routes/mayan/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
// Helper function to normalize quote for testnet compatibility
protected normalizeQuoteForTestnet(quote: MayanQuote): any {
// Remove properties that don't exist in testnet SDK
const { hyperCoreParams, ...testnetCompatibleQuote } = quote;

Check warning on line 153 in src/routes/mayan/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

'hyperCoreParams' is assigned a value but never used. Allowed unused vars must match /^_/u
return testnetCompatibleQuote;
}

Expand Down Expand Up @@ -575,7 +575,7 @@
decimals,
);
return minAmount;
} catch (e) {

Check warning on line 578 in src/routes/mayan/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

'e' is defined but never used. Allowed unused caught errors must match /^_/u
return null;
}
}
Expand Down Expand Up @@ -611,9 +611,11 @@
),
};

const deadline64Seconds = parseInt(quote.deadline64, 10) * 1000;
const expires = deadline64Seconds
? new Date(deadline64Seconds)
// deadline64 is in seconds
const deadline64MilliSeconds = parseInt(quote.deadline64, 10) * 1000;

const expires = deadline64MilliSeconds
? new Date(deadline64MilliSeconds)
: undefined;

const fullQuote: Q = {
Expand Down
Loading
Loading