Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/getFileList.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const fileSet = new Set();
root1 === 'adaptors' &&
dir !== 'test.js' &&
dir !== 'utils.js' &&
dir !== 'checkStablecoin.js' &&
dir !== 'package.json' &&
dir !== 'package-lock.json'
)
Expand Down
7 changes: 7 additions & 0 deletions src/adaptors/checkStablecoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ const checkStablecoin = (el, stablecoins) => {
let tokens = el.symbol.split('-').map((el) => el.toLowerCase());
const symbolLC = el.symbol.toLowerCase();

// tokens that merely CONTAIN a stablecoin symbol substring but are NOT stablecoins.
// e.g. 'pufeth'.includes('feth') or 'lanternsol'.includes('ern') otherwise flag these
// volatile assets (restaked ETH, a SOL LST, TRON SUN) as stablecoin: true.
const notStable = ['pufeth', 'lanternsol', 'sunold'];
if (tokens.some((t) => notStable.includes(t.replace(/\s*\(.*?\)\s*/g, ''))))
return false;

let stable;
if (
el.project === 'curve' &&
Expand Down
Loading