Skip to content

Commit c87a5e0

Browse files
committed
fix: remove double quoting
1 parent 0550838 commit c87a5e0

10 files changed

Lines changed: 248 additions & 158 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ tsconfig.tsbuildinfo
3737

3838
# Local Netlify folder
3939
.netlify
40-
.vscode
4140
.ignore
4241
.yalc
4342
yalc.lock

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"prettier.requireConfig": true,
5+
"workbench.colorCustomizations": {
6+
"activityBar.background": "#02072d",
7+
"titleBar.activeBackground": "#000285",
8+
"titleBar.activeForeground": "#dae6f9"
9+
}
10+
}

src/hooks/useConfirmTransaction.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,17 @@ const useConfirmTransaction = (props: Props): ReturnProps => {
161161
);
162162
}
163163

164-
const [sdkRoute, receipt] = await config.routes
165-
.get(route)
166-
.send(
167-
sourceToken,
168-
amount,
169-
sourceChain,
170-
signer,
171-
destChain,
172-
receivingWallet.address,
173-
destToken,
174-
{ nativeGas: toNativeToken },
175-
);
164+
const [sdkRoute, receipt] = await config.routes.execute(
165+
route,
166+
sourceToken,
167+
amount,
168+
sourceChain,
169+
signer,
170+
destChain,
171+
receivingWallet.address,
172+
destToken,
173+
{ nativeGas: toNativeToken },
174+
);
176175

177176
// Clear cached balances on sending chain
178177
clearBalanceCache(sendingWallet, sourceChain);

src/hooks/useFetchQuotes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ export default (routes: string[], params: Params): HookReturn => {
8383
return;
8484
}
8585

86-
const nextExpiry = config.routes.quoteCache.nextExpiry(routes, rParams);
86+
const nextExpiry = config.routes.quoteMetadataCache.nextExpiry(
87+
routes,
88+
rParams,
89+
);
8790

8891
if (!nextExpiry) {
8992
return;

src/routes/mayan/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,11 @@ class MayanRouteBase<N extends Network> extends routes.AutomaticRoute<
611611
),
612612
};
613613

614-
const deadline64Seconds = parseInt(quote.deadline64, 10) * 1000;
615-
const expires = deadline64Seconds
616-
? new Date(deadline64Seconds)
614+
// deadline64 is in seconds
615+
const deadline64MilliSeconds = parseInt(quote.deadline64, 10) * 1000;
616+
617+
const expires = deadline64MilliSeconds
618+
? new Date(deadline64MilliSeconds)
617619
: undefined;
618620

619621
const fullQuote: Q = {

0 commit comments

Comments
 (0)