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

fix: Mirror node response parser and arrow function replacement #309

Merged
merged 17 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
e65bc6a
feat: Migrated to TypeScript, all files translated and added draft mo…
ivaylogarnev-limechain Nov 28, 2024
2d206ed
feat: Migrated all files to TS, added allies and typezation
ivaylogarnev-limechain Dec 2, 2024
52a6f19
Merge branch 'main' into 00275-tck-typescript-migration
ivaylogarnev-limechain Dec 2, 2024
7ff7c9d
fix: Fixed some mirror custom fees helper functions, namings and refa…
ivaylogarnev-limechain Dec 3, 2024
c88c56b
refactor: Changed the .md files naming and moved them inside docs dir…
ivaylogarnev-limechain Dec 4, 2024
89199e2
fix: Removed .only
ivaylogarnev-limechain Dec 4, 2024
7541737
refactor: Converted account transaction number props to strings
ivaylogarnev-limechain Dec 4, 2024
940fc16
refactor: Changed numbers to string for accounts txs, introduced enums
ivaylogarnev-limechain Dec 5, 2024
f176c62
Merge branch 'main' into 00284-update-types-in-account-transactions
ivaylogarnev-limechain Dec 5, 2024
bb2b790
fix: AccountCreate md fixed
ivaylogarnev-limechain Dec 5, 2024
352d48a
fix: Fixed comments
ivaylogarnev-limechain Dec 6, 2024
538abcd
fix: Removed .only
ivaylogarnev-limechain Dec 6, 2024
fc975d2
Merge branch 'main' into 00284-update-types-in-account-transactions
ivaylogarnev-limechain Dec 6, 2024
15d7813
refactor: Skipped int64 min test
ivaylogarnev-limechain Dec 6, 2024
4fd909d
fix: Removed .only and added a specific test file execution script, a…
ivaylogarnev-limechain Dec 9, 2024
e489c7e
fix: Added BigInt parser for mirror node data, updated mocha tests fu…
ivaylogarnev-limechain Dec 12, 2024
5a2be04
Merge branch 'main' into 00307-bug-mirror-node-data-mocha-context
ivaylogarnev-limechain Dec 12, 2024
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
106 changes: 53 additions & 53 deletions src/tests/crypto-service/test-account-create-transaction.ts

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions src/tests/crypto-service/test-account-delete-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("AccountDeleteTransaction", function () {
// An account is created for each test. These hold the information for that account.
let accountPrivateKey: string, accountId: string;

beforeEach(async () => {
beforeEach(async function () {
// Initialize the network and operator.
await setOperator(
this,
Expand All @@ -35,12 +35,12 @@ describe("AccountDeleteTransaction", function () {

accountId = response.accountId;
});
afterEach(async () => {
afterEach(async function () {
await JSONRPCRequest(this, "reset");
});

describe("Delete Account Id", async () => {
it("(#1) Deletes an account with no transfer account", async () => {
describe("Delete Account Id", async function () {
it("(#1) Deletes an account with no transfer account", async function () {
try {
// Attempt to delete the account without a transfer account. The network should respond with an ACCOUNT_ID_DOES_NOT_EXIST status.
await JSONRPCRequest(this, "deleteAccount", {
Expand All @@ -58,7 +58,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#2) Deletes an account with no delete account", async () => {
it("(#2) Deletes an account with no delete account", async function () {
try {
// Attempt to delete the account without a delete account. The network should respond with an ACCOUNT_ID_DOES_NOT_EXIST status.
await JSONRPCRequest(this, "deleteAccount", {
Expand All @@ -76,7 +76,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#3) Deletes an admin account", async () => {
it("(#3) Deletes an admin account", async function () {
try {
// Attempt to delete an admin account. The network should respond with an ENTITY_NOT_ALLOWED_TO_DELETE status.
await JSONRPCRequest(this, "deleteAccount", {
Expand All @@ -95,7 +95,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#4) Deletes an account that doesn't exist", async () => {
it("(#4) Deletes an account that doesn't exist", async function () {
try {
// Attempt to delete an account that doesn't exist. The network should respond with an INVALID_ACCOUNT_ID status.
await JSONRPCRequest(this, "deleteAccount", {
Expand All @@ -114,7 +114,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#5) Deletes an account that was already deleted", async () => {
it("(#5) Deletes an account that was already deleted", async function () {
// Delete the account first.
await JSONRPCRequest(this, "deleteAccount", {
deleteAccountId: accountId,
Expand Down Expand Up @@ -142,7 +142,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#6) Deletes an account without signing with the account's private key", async () => {
it("(#6) Deletes an account without signing with the account's private key", async function () {
try {
// Attempt to delete the account without signing with the account's private key. The network should respond with an INVALID_SIGNATURE status.
await JSONRPCRequest(this, "deleteAccount", {
Expand All @@ -158,7 +158,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#7) Deletes an account but signs with an incorrect private key", async () => {
it("(#7) Deletes an account but signs with an incorrect private key", async function () {
// Generate a private key.
const key = await JSONRPCRequest(this, "generateKey", {
type: "ed25519PrivateKey",
Expand All @@ -183,8 +183,8 @@ describe("AccountDeleteTransaction", function () {
});
});

describe("Transfer Account Id", async () => {
it("(#1) Deletes an account with a valid transfer account", async () => {
describe("Transfer Account Id", async function () {
it("(#1) Deletes an account with a valid transfer account", async function () {
// Attempt to delete the account and transfer its funds to the operator account.
await JSONRPCRequest(this, "deleteAccount", {
deleteAccountId: accountId,
Expand All @@ -207,7 +207,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#2) Deletes an account with a transfer account that is the deleted account", async () => {
it("(#2) Deletes an account with a transfer account that is the deleted account", async function () {
try {
// Attempt to delete the account with a transfer account that is the deleted account. The network should respond with an TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT status.
await JSONRPCRequest(this, "deleteAccount", {
Expand All @@ -229,7 +229,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#3) Deletes an account with a transfer account that is invalid/doesn't exist", async () => {
it("(#3) Deletes an account with a transfer account that is invalid/doesn't exist", async function () {
try {
// Attempt to delete the account with a transfer account that is the deleted account. The network should respond with an INVALID_TRANSFER_ACCOUNT_ID status.
await JSONRPCRequest(this, "deleteAccount", {
Expand All @@ -248,7 +248,7 @@ describe("AccountDeleteTransaction", function () {
assert.fail("Should throw an error");
});

it("(#4) Deletes an account with a transfer account that is a deleted account", async () => {
it("(#4) Deletes an account with a transfer account that is a deleted account", async function () {
// Generate a key.
var response = await JSONRPCRequest(this, "generateKey", {
type: "ecdsaSecp256k1PrivateKey",
Expand Down
Loading