Skip to content

Commit

Permalink
chore: fix adjustment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler authored and dtfiedler committed Apr 2, 2024
1 parent 5fd2a93 commit 2fa3cce
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions tests/router.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,19 @@ describe("Router tests", () => {
expect(data).to.deep.equal({
// No Infra Fee
fiat: {
aud: 8.888074843239,
brl: 29.787061636803,
cad: 8.055890229538,
eur: 5.48212338304,
gbp: 4.770047888842,
hkd: 47.177146296308,
inr: 493.502634370348,
jpy: 809.295247212831,
sgd: 7.987256446965,
usd: 6.022614420805,
aud: 7.756335974575,
brl: 25.994207049929,
cad: 7.030115328307,
eur: 4.784072092426,
gbp: 4.162666797166,
hkd: 41.169972513698,
inr: 430.663816858609,
jpy: 706.245835090421,
sgd: 6.970220842017,
usd: 5.255741171961,
},
// No Subsidy
winc: "857922282166",
winc: "748681078627",
adjustments: [],
});
clock.restore();
Expand All @@ -277,18 +277,18 @@ describe("Router tests", () => {
expect(data).to.deep.equal({
// No Subsidy
fiat: {
aud: 11.110093554049,
brl: 37.233827046004,
cad: 10.069862786923,
eur: 6.8526542288,
gbp: 5.962559861053,
hkd: 58.971432870385,
inr: 616.878292962935,
jpy: 1011.619059016038,
sgd: 9.984070558706,
usd: 7.528268026006,
aud: 9.695419968219,
brl: 32.492758812411,
cad: 8.787644160384,
eur: 5.980090115533,
gbp: 5.203333496457,
hkd: 51.462465642123,
inr: 538.329771073261,
jpy: 882.807293863027,
sgd: 8.712776052521,
usd: 6.569676464951,
},
winc: "857922282166",
winc: "748681078627",
adjustments: [],
});
clock.restore();
Expand All @@ -308,21 +308,21 @@ describe("Router tests", () => {

expect(data.fiat).to.deep.equal({
// 23.4% Infra Fee applied
aud: 6.381776976212,
brl: 21.387576893252,
cad: 5.78425538674,
eur: 3.936250470849,
gbp: 3.424969110785,
hkd: 33.873930108293,
inr: 354.34262258945,
jpy: 581.086665752968,
sgd: 5.73497525565,
usd: 4.324331503186,
aud: 5.569170738913,
brl: 18.664247881764,
cad: 5.047732938069,
eur: 3.435038708654,
gbp: 2.988859971849,
hkd: 29.560685225179,
inr: 309.223367195491,
jpy: 507.095573497297,
sgd: 5.004727758618,
usd: 3.773704496831,
});

// 45% Subsidy Event applied
expect(data.winc).to.equal("471857255191");
expect(data.adjustments[0].adjustmentAmount).to.equal("-386065026975");
expect(data.winc).to.equal("411774593244");
expect(data.adjustments[0].adjustmentAmount).to.equal("-336906485383");
clock.restore();
});

Expand Down

0 comments on commit 2fa3cce

Please sign in to comment.