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

Cleanup tests to match expected behavior #119

Merged
merged 2 commits into from
Oct 25, 2023
Merged
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
24 changes: 12 additions & 12 deletions tests/e2e/transaction/generateTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ describe("generate transaction", () => {
sender: senderAccount.accountAddress.toString(),
data: {
multisigAddress: secondarySignerAccount.accountAddress,
function: "0x0000000000000000000000000000000000000000000000000000000000000123::module::name",
functionArguments: [new U64(1), recieverAccounts[0].accountAddress],
function: "0x1::aptos_account::transfer",
functionArguments: [recieverAccounts[0].accountAddress, new U64(1)],
},
});
expect(transaction.rawTransaction instanceof Uint8Array).toBeTruthy();
Expand All @@ -58,8 +58,8 @@ describe("generate transaction", () => {
const transaction = await aptos.generateTransaction({
sender: senderAccount.accountAddress.toString(),
data: {
function: "0x0000000000000000000000000000000000000000000000000000000000000123::module::name",
functionArguments: [new U64(1), recieverAccounts[0].accountAddress],
function: "0x1::aptos_account::transfer",
functionArguments: [recieverAccounts[0].accountAddress, new U64(1)],
},
});
expect(transaction.rawTransaction instanceof Uint8Array).toBeTruthy();
Expand Down Expand Up @@ -96,8 +96,8 @@ describe("generate transaction", () => {
sender: senderAccount.accountAddress.toString(),
secondarySignerAddresses: [secondarySignerAccount.accountAddress.toString()],
data: {
function: "0x0000000000000000000000000000000000000000000000000000000000000123::module::name",
functionArguments: [new U64(1), recieverAccounts[0].accountAddress],
function: "0x1::aptos_account::transfer",
functionArguments: [recieverAccounts[0].accountAddress, new U64(1)],
},
});
expect(transaction.rawTransaction instanceof Uint8Array).toBeTruthy();
Expand Down Expand Up @@ -135,8 +135,8 @@ describe("generate transaction", () => {
feePayerAddress: feePayerAccount.accountAddress.toString(),
data: {
multisigAddress: secondarySignerAccount.accountAddress,
function: "0x0000000000000000000000000000000000000000000000000000000000000123::module::name",
functionArguments: [new U64(1), recieverAccounts[0].accountAddress],
function: "0x1::aptos_account::transfer",
functionArguments: [recieverAccounts[0].accountAddress, new U64(1)],
},
});
expect(transaction.rawTransaction instanceof Uint8Array).toBeTruthy();
Expand All @@ -153,8 +153,8 @@ describe("generate transaction", () => {
sender: senderAccount.accountAddress.toString(),
feePayerAddress: feePayerAccount.accountAddress.toString(),
data: {
function: "0x0000000000000000000000000000000000000000000000000000000000000123::module::name",
functionArguments: [new U64(1), recieverAccounts[0].accountAddress],
function: "0x1::aptos_account::transfer",
functionArguments: [recieverAccounts[0].accountAddress, new U64(1)],
},
});
expect(transaction.rawTransaction instanceof Uint8Array).toBeTruthy();
Expand All @@ -172,8 +172,8 @@ describe("generate transaction", () => {
secondarySignerAddresses: [secondarySignerAccount.accountAddress.toString()],
feePayerAddress: feePayerAccount.accountAddress.toString(),
data: {
function: "0x0000000000000000000000000000000000000000000000000000000000000123::module::name",
functionArguments: [new U64(1), recieverAccounts[0].accountAddress],
function: "0x1::aptos_account::transfer",
functionArguments: [recieverAccounts[0].accountAddress, new U64(1)],
},
});
expect(transaction.rawTransaction instanceof Uint8Array).toBeTruthy();
Expand Down
22 changes: 11 additions & 11 deletions tests/e2e/transaction/transactionBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe("transaction builder", () => {
const payload = generateTransactionPayload({
multisigAddress: bob.accountAddress,
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const rawTxn = await generateRawTransaction({
aptosConfig: config,
Expand All @@ -111,7 +111,7 @@ describe("transaction builder", () => {
const bob = Account.generate();
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const rawTxn = await generateRawTransaction({
aptosConfig: config,
Expand Down Expand Up @@ -157,7 +157,7 @@ describe("transaction builder", () => {
const bob = Account.generate();
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const secondarySignerAddress = Account.generate();
const transaction = await buildTransaction({
Expand All @@ -183,7 +183,7 @@ describe("transaction builder", () => {
const bob = Account.generate();
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const feePayer = Account.generate();
const transaction = await buildTransaction({
Expand All @@ -209,7 +209,7 @@ describe("transaction builder", () => {
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
typeArguments: [],
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const feePayer = Account.generate();
const secondarySignerAddress = Account.generate();
Expand Down Expand Up @@ -306,7 +306,7 @@ describe("transaction builder", () => {
const payload = generateTransactionPayload({
multisigAddress: bob.accountAddress,
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const transaction = await buildTransaction({
aptosConfig: config,
Expand Down Expand Up @@ -400,7 +400,7 @@ describe("transaction builder", () => {
);
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const transaction = await buildTransaction({
aptosConfig: config,
Expand Down Expand Up @@ -434,7 +434,7 @@ describe("transaction builder", () => {
const bob = Account.generate();
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const transaction = await buildTransaction({
aptosConfig: config,
Expand Down Expand Up @@ -469,7 +469,7 @@ describe("transaction builder", () => {
const bob = Account.generate();
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const transaction = await buildTransaction({
aptosConfig: config,
Expand All @@ -488,7 +488,7 @@ describe("transaction builder", () => {
const bob = Account.generate();
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const transaction = await buildTransaction({
aptosConfig: config,
Expand All @@ -509,7 +509,7 @@ describe("transaction builder", () => {
const bob = Account.generate();
const payload = generateTransactionPayload({
function: "0x1::aptos_account::transfer",
functionArguments: [new MoveObject(bob.accountAddress), new U64(1)],
functionArguments: [bob.accountAddress, new U64(1)],
});
const transaction = await buildTransaction({
aptosConfig: config,
Expand Down
Loading