Skip to content

Commit 52c7063

Browse files
authored
chore: Fix failing E2E sendSolTransaction policy evaluation tests (#419)
1 parent 9830323 commit 52c7063

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

typescript/src/e2e.test.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@ describe("CDP Client E2E Tests", () => {
30373037
});
30383038
});
30393039

3040-
describe.skip("sendSolTransaction", () => {
3040+
describe("sendSolTransaction", () => {
30413041
describe("solValue", () => {
30423042
it(">=", async () => {
30433043
await cdp.policies.updatePolicy({
@@ -3048,7 +3048,7 @@ describe("CDP Client E2E Tests", () => {
30483048
operation: "sendSolTransaction",
30493049
action: "reject",
30503050
criteria: [
3051-
{ type: "solValue", operator: ">=", solValue: "1000000000" }, // 1 SOL in lamports
3051+
{ type: "solValue", operator: ">=", solValue: "1" }, // 1 lamport
30523052
],
30533053
},
30543054
],
@@ -3064,7 +3064,7 @@ describe("CDP Client E2E Tests", () => {
30643064
transaction: createAndEncodeTransaction(
30653065
policySolanaTestAccount.address,
30663066
"EeVPcnRE1mhcY85wAh3uPJG1uFiTNya9dCJjNUPABXzo",
3067-
1.5 * LAMPORTS_PER_SOL,
3067+
2,
30683068
),
30693069
}),
30703070
).rejects.toThrowError(expect.objectContaining(policyViolation));
@@ -3079,7 +3079,7 @@ describe("CDP Client E2E Tests", () => {
30793079
operation: "sendSolTransaction",
30803080
action: "reject",
30813081
criteria: [
3082-
{ type: "solValue", operator: "<=", solValue: "500000000" }, // 0.5 SOL in lamports
3082+
{ type: "solValue", operator: "<=", solValue: "2" }, // 2 lamports
30833083
],
30843084
},
30853085
],
@@ -3095,7 +3095,7 @@ describe("CDP Client E2E Tests", () => {
30953095
transaction: createAndEncodeTransaction(
30963096
policySolanaTestAccount.address,
30973097
"EeVPcnRE1mhcY85wAh3uPJG1uFiTNya9dCJjNUPABXzo",
3098-
0.3 * LAMPORTS_PER_SOL,
3098+
1,
30993099
),
31003100
}),
31013101
).rejects.toThrowError(expect.objectContaining(policyViolation));
@@ -3110,7 +3110,7 @@ describe("CDP Client E2E Tests", () => {
31103110
operation: "sendSolTransaction",
31113111
action: "reject",
31123112
criteria: [
3113-
{ type: "solValue", operator: ">", solValue: "750000000" }, // 0.75 SOL in lamports
3113+
{ type: "solValue", operator: ">", solValue: "1" }, // 1 lamport
31143114
],
31153115
},
31163116
],
@@ -3126,7 +3126,7 @@ describe("CDP Client E2E Tests", () => {
31263126
transaction: createAndEncodeTransaction(
31273127
policySolanaTestAccount.address,
31283128
"EeVPcnRE1mhcY85wAh3uPJG1uFiTNya9dCJjNUPABXzo",
3129-
1 * LAMPORTS_PER_SOL,
3129+
2,
31303130
),
31313131
}),
31323132
).rejects.toThrowError(expect.objectContaining(policyViolation));
@@ -3141,7 +3141,7 @@ describe("CDP Client E2E Tests", () => {
31413141
operation: "sendSolTransaction",
31423142
action: "reject",
31433143
criteria: [
3144-
{ type: "solValue", operator: "<", solValue: "2000000000" }, // 2 SOL in lamports
3144+
{ type: "solValue", operator: "<", solValue: "2" }, // 2 lamports
31453145
],
31463146
},
31473147
],
@@ -3157,7 +3157,7 @@ describe("CDP Client E2E Tests", () => {
31573157
transaction: createAndEncodeTransaction(
31583158
policySolanaTestAccount.address,
31593159
"EeVPcnRE1mhcY85wAh3uPJG1uFiTNya9dCJjNUPABXzo",
3160-
1 * LAMPORTS_PER_SOL,
3160+
1,
31613161
),
31623162
}),
31633163
).rejects.toThrowError(expect.objectContaining(policyViolation));
@@ -3172,7 +3172,7 @@ describe("CDP Client E2E Tests", () => {
31723172
operation: "sendSolTransaction",
31733173
action: "reject",
31743174
criteria: [
3175-
{ type: "solValue", operator: "==", solValue: "1000000000" }, // 1 SOL in lamports
3175+
{ type: "solValue", operator: "==", solValue: "1" }, // 1 lamport
31763176
],
31773177
},
31783178
],
@@ -3188,7 +3188,7 @@ describe("CDP Client E2E Tests", () => {
31883188
transaction: createAndEncodeTransaction(
31893189
policySolanaTestAccount.address,
31903190
"EeVPcnRE1mhcY85wAh3uPJG1uFiTNya9dCJjNUPABXzo",
3191-
1 * LAMPORTS_PER_SOL,
3191+
1,
31923192
),
31933193
}),
31943194
).rejects.toThrowError(expect.objectContaining(policyViolation));
@@ -3225,7 +3225,7 @@ describe("CDP Client E2E Tests", () => {
32253225
transaction: createAndEncodeTransaction(
32263226
policySolanaTestAccount.address,
32273227
"EeVPcnRE1mhcY85wAh3uPJG1uFiTNya9dCJjNUPABXzo",
3228-
0.1 * LAMPORTS_PER_SOL,
3228+
1,
32293229
),
32303230
}),
32313231
).rejects.toThrowError(expect.objectContaining(policyViolation));
@@ -3260,7 +3260,7 @@ describe("CDP Client E2E Tests", () => {
32603260
transaction: createAndEncodeTransaction(
32613261
policySolanaTestAccount.address,
32623262
"EeVPcnRE1mhcY85wAh3uPJG1uFiTNya9dCJjNUPABXzo",
3263-
0.1 * LAMPORTS_PER_SOL,
3263+
1,
32643264
),
32653265
}),
32663266
).rejects.toThrowError(expect.objectContaining(policyViolation));

0 commit comments

Comments
 (0)