Skip to content

Commit

Permalink
Merge pull request #509 from multiversx/TOOL-264-bring-sdk-wallet-int…
Browse files Browse the repository at this point in the history
…o-sdk-core-mark-as-deprecated

Mark ITransactionNext as deprecated
  • Loading branch information
danielailie authored Oct 15, 2024
2 parents fe5f1b4 + 6ceb8be commit cf98adc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
45 changes: 21 additions & 24 deletions src/networkProviders/interface.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ITransaction as ITransactionAsInSpecs } from "../interface";
import { AccountOnNetwork } from "./accounts";
import { ContractQueryResponse } from "./contractQueryResponse";
import { NetworkConfig } from "./networkConfig";
Expand Down Expand Up @@ -46,7 +47,10 @@ export interface INetworkProvider {
/**
* Fetches data about the non-fungible tokens held by account.
*/
getNonFungibleTokensOfAccount(address: IAddress, pagination?: IPagination): Promise<NonFungibleTokenOfAccountOnNetwork[]>;
getNonFungibleTokensOfAccount(
address: IAddress,
pagination?: IPagination,
): Promise<NonFungibleTokenOfAccountOnNetwork[]>;

/**
* Fetches data about a specific fungible token held by an account.
Expand All @@ -56,7 +60,11 @@ export interface INetworkProvider {
/**
* Fetches data about a specific non-fungible token (instance) held by an account.
*/
getNonFungibleTokenOfAccount(address: IAddress, collection: string, nonce: number): Promise<NonFungibleTokenOfAccountOnNetwork>;
getNonFungibleTokenOfAccount(
address: IAddress,
collection: string,
nonce: number,
): Promise<NonFungibleTokenOfAccountOnNetwork>;

/**
* Fetches the state of a transaction.
Expand All @@ -80,7 +88,7 @@ export interface INetworkProvider {

/**
* Simulates the processing of an already-signed transaction.
*
*
*/
simulateTransaction(tx: ITransaction): Promise<any>;

Expand Down Expand Up @@ -118,8 +126,8 @@ export interface INetworkProvider {
export interface IContractQuery {
address: IAddress;
caller?: IAddress;
func: { toString(): string; };
value?: { toString(): string; };
func: { toString(): string };
value?: { toString(): string };
getEncodedArguments(): string[];
}

Expand All @@ -132,22 +140,11 @@ export interface ITransaction {
toSendable(): any;
}

export interface IAddress { bech32(): string; }

export interface ITransactionNext {
sender: string;
receiver: string;
gasLimit: bigint;
chainID: string;
nonce: bigint;
value: bigint;
senderUsername: string;
receiverUsername: string;
gasPrice: bigint;
data: Uint8Array;
version: number;
options: number;
guardian: string;
signature: Uint8Array;
guardianSignature: Uint8Array;
}
export interface IAddress {
bech32(): string;
}

/**
* @deprecated This will be removed with the next release (replaced by the `ITransaction` interface from "src/interface.ts").
*/
export type ITransactionNext = ITransactionAsInSpecs;
2 changes: 2 additions & 0 deletions src/networkProviders/providers.dev.net.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ describe("test network providers on devnet: Proxy and API", function () {
guardian: "",
guardianSignature: new Uint8Array(),
options: 0,
relayer: "",
innerTransactions: [],
};

const apiLegacyTxHash = await apiProvider.sendTransaction(transaction);
Expand Down

0 comments on commit cf98adc

Please sign in to comment.