Skip to content

Commit

Permalink
more SOR logging to debug when it's crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
gmbronco committed Dec 14, 2023
1 parent 4d60790 commit 07807a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/beethoven/balancer-sdk.resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { headerChain } from '../context/header-chain';
const balancerSdkResolvers: Resolvers = {
Query: {
sorGetSwaps: async (parent, args, context) => {
console.log('sorGetSwaps args', JSON.stringify(args));

const currentChain = headerChain();
if (!args.chain && currentChain) {
args.chain = currentChain;
Expand Down
1 change: 1 addition & 0 deletions modules/sor/sor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class SorService {
}

private async getSwap(input: GetSwapsInput, v1Service: SwapService = sorV1BalancerService) {
console.log(`Running SOR for ${input.swapAmount} ${input.tokenIn} > ${input.tokenOut}`);
const v1Start = +new Date();
const swapV1 = await v1Service.getSwapResult(input);
const v1Time = +new Date() - v1Start;
Expand Down

0 comments on commit 07807a4

Please sign in to comment.