Skip to content
Draft
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
12 changes: 6 additions & 6 deletions modules/statics/src/coins/solTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ export const solTokens = [
9,
'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey',
'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey',
UnderlyingAsset.MNDE,
UnderlyingAsset['sol:mnde'],
SOL_TOKEN_FEATURES
),
solToken(
Expand Down Expand Up @@ -1892,7 +1892,7 @@ export const solTokens = [
9,
'jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL',
'jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL',
UnderlyingAsset['jto'],
UnderlyingAsset['sol:jto'],
SOL_TOKEN_FEATURES_EXCLUDE_EUROPE
),
solToken(
Expand All @@ -1902,7 +1902,7 @@ export const solTokens = [
6,
'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN',
'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN',
UnderlyingAsset['jup'],
UnderlyingAsset['sol:jup'],
[...SOL_TOKEN_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.CUSTODY_BITGO_FRANKFURT, CoinFeature.BULK_TRANSACTION]
),
solToken(
Expand All @@ -1922,7 +1922,7 @@ export const solTokens = [
6,
'EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm',
'EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm',
UnderlyingAsset['wif'],
UnderlyingAsset['sol:wif'],
SOL_TOKEN_FEATURES_WITH_FRANKFURT
),
solToken(
Expand All @@ -1932,7 +1932,7 @@ export const solTokens = [
6,
'FRySi8LPkuByB7VPSCCggxpewFUeeJiwEGRKKuhwpKcX',
'FRySi8LPkuByB7VPSCCggxpewFUeeJiwEGRKKuhwpKcX',
UnderlyingAsset['natix'],
UnderlyingAsset['sol:natix'],
SOL_TOKEN_FEATURES
),
solToken(
Expand Down Expand Up @@ -2012,7 +2012,7 @@ export const solTokens = [
6,
'mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6',
'mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6',
UnderlyingAsset['mobile'],
UnderlyingAsset['sol:mobile'],
SOL_TOKEN_FEATURES
),
solToken(
Expand Down
23 changes: 23 additions & 0 deletions modules/statics/test/unit/ofcCoinParity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,29 @@ describe('OFC Coin parity tests', function () {
}
});

it('should have asset parity between SOL OFC tokens and their on-chain tokens', function () {
const failures: string[] = [];

coins
.filter((coin) => coin.family === 'ofc' && coin.name.startsWith('ofcsol:'))
.forEach((ofcCoin) => {
const baseTokenName = ofcCoin.name.replace(/^ofc/, '');
const baseToken = getCoin(baseTokenName);
if (!baseToken) {
failures.push(`${ofcCoin.name}: underlying token '${baseTokenName}' does not exist`);
return;
}
if (baseToken.asset !== ofcCoin.asset) {
failures.push(
`${ofcCoin.name}: asset='${ofcCoin.asset}' does not match ${baseToken.name}.asset='${baseToken.asset}'`
);
}
});

const message = 'SOL OFC tokens whose asset does not match their on-chain token';
should(failures).deepEqual([], `${message}\n${failures.join('\n')}`);
});

it('validate the decimalPlaces for ofc token', function () {
const ofcCoins = coins.filter((coin) => coin.family === 'ofc');
ofcCoins.forEach((ofcCoin) => {
Expand Down
Loading