Skip to content
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

sb2 crank update #1011

Open
wants to merge 3 commits into
base: deploy
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
"tsx": "^4.15.7",
"tweetnacl": "1.0.3",
"typedoc": "^0.26.5",
"typescript": "^5.5.4"
"typescript": "^5.5.4",
"express": "^4.18.2",
"express-prom-bundle": "^8.0.0",
"prom-client": "^15.1.3"
},
"prettier": {
"singleQuote": true,
Expand All @@ -75,7 +78,7 @@
"@solana/spl-token": "0.4.8",
"@solana/web3.js": "^1.95.2",
"@switchboard-xyz/common": "^2.4.4",
"@switchboard-xyz/on-demand": "^1.2.38",
"@switchboard-xyz/on-demand": "^1.2.51",
"@switchboard-xyz/sbv2-lite": "^0.1.6",
"@switchboard-xyz/solana.js": "^3.2.5",
"big.js": "^6.1.1",
Expand All @@ -95,4 +98,4 @@
"strip-ansi": "6.0.1"
},
"license": "MIT"
}
}
4 changes: 2 additions & 2 deletions ts/client/scripts/manageFeeWs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export function manageFeeWebSocket(
});

ws.addEventListener('error', (error) => {
console.log('Fee WebSocket error:', error);
onMeanCalculated(-1);
// console.log('Fee WebSocket error:', error);
onMeanCalculated(null);
ws?.close();
});

Expand Down
9 changes: 4 additions & 5 deletions ts/client/scripts/sb-on-demand-crank-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import { ZERO_I80F48 } from '../src/numbers/I80F48';
export interface OraclesFromMangoGroupInterface {
oraclePk: PublicKey;
name: string;
tier: string;
fallbackForOracle: PublicKey | undefined;
tokenIndex: TokenIndex | undefined; // todo remove
perpMarketIndex: PerpMarketIndex | undefined;
isOracleStaleOrUnconfident: boolean;
// todo: add tier when program mango-v4 24.3 is released
}

/**
Expand All @@ -37,10 +36,10 @@ export function getOraclesForMangoGroup(
return {
oraclePk: b[0].oracle,
name: b[0].name,
tier: b[0].tier,
fallbackForOracle: undefined,
tokenIndex: b[0].tokenIndex,
perpMarketIndex: undefined,
isOracleStaleOrUnconfident: false,
};
});

Expand All @@ -51,10 +50,10 @@ export function getOraclesForMangoGroup(
return {
oraclePk: pM.oracle,
name: pM.name,
tier: "S",
fallbackForOracle: undefined,
tokenIndex: undefined,
perpMarketIndex: pM.perpMarketIndex,
isOracleStaleOrUnconfident: false,
};
});

Expand All @@ -74,10 +73,10 @@ export function getOraclesForMangoGroup(
return {
oraclePk: b[0].fallbackOracle,
name: b[0].name,
tier: b[0].tier,
fallbackForOracle: b[0].oracle,
tokenIndex: b[0].tokenIndex,
perpMarketIndex: undefined,
isOracleStaleOrUnconfident: false,
};
})
.filter((item) => !item.oraclePk.equals(PublicKey.default));
Expand Down
Loading
Loading