Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
feat(mmfinance): Integrate MM Finance (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
croc12344 authored Jul 16, 2022
1 parent 4411f79 commit 1fcbb36
Show file tree
Hide file tree
Showing 45 changed files with 19,891 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class CronosArgoFinancePledgingContractPositionFetcher implements Positio
const contractTokens = await this.appToolkit.getAppTokenPositions({
appId,
groupIds: [ARGO_FINANCE_DEFINITION.groups.xArgo.id],
network
network,
});
const baseToken = contractTokens.find(t => t.symbol === 'xARGO')!;
const croToken = baseTokens.find(t => t.symbol === 'WCRO')!;
Expand Down
7 changes: 1 addition & 6 deletions src/apps/mean-finance/graphql/getPairs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ import { gql } from 'graphql-request';

export const GET_PAIRS = gql`
query getAvailablePairs {
pairs(
first: $first,
skip: $skip,
orderDirection: desc,
orderBy: createdAtTimestamp,
) {
pairs(first: $first, skip: $skip, orderDirection: desc, orderBy: createdAtTimestamp) {
id
tokenA {
address: id
Expand Down
13 changes: 5 additions & 8 deletions src/apps/mean-finance/graphql/getUserPositions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ import { gql } from 'graphql-request';
export const GET_USER_POSITIONS = gql`
query getUserPositions($address: String!, $first: Int, $skip: Int) {
positions(
where: {
user: $address,
status_in: [ACTIVE, COMPLETED],
},
first: $first,
skip: $skip,
orderDirection: desc,
orderBy: createdAtTimestamp,
where: { user: $address, status_in: [ACTIVE, COMPLETED] }
first: $first
skip: $skip
orderDirection: desc
orderBy: createdAtTimestamp
) {
id
executedSwaps
Expand Down
1 change: 1 addition & 0 deletions src/apps/mean-finance/helpers/graph.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TheGraphHelper } from '~app-toolkit/helpers/the-graph/the-graph.helper';

import { GET_PAIRS } from '../graphql/getPairs';
import { GET_POSITIONS } from '../graphql/getPositions';
import { GET_USER_POSITIONS } from '../graphql/getUserPositions';
Expand Down
Binary file added src/apps/mmfinance/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1fcbb36

Please sign in to comment.