Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
export TransactionStatus as consts
Browse files Browse the repository at this point in the history
  • Loading branch information
Morley Zhi committed Sep 26, 2019
1 parent a7f7d1b commit c4d1ce7
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stellar/wallet-sdk",
"version": "0.0.6-rc.2",
"version": "0.0.6-rc.3",
"description": "Libraries to help you write Stellar-enabled wallets in Javascript",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
15 changes: 15 additions & 0 deletions src/constants/transfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,18 @@ export enum TransferResponseType {
customer_info_status = "customer_info_status",
error = "error",
}

export enum TransactionStatus {
completed = "completed",
pending_external = "pending_external",
pending_anchor = "pending_anchor",
pending_stellar = "pending_stellar",
pending_trust = "pending_trust",
pending_user = "pending_user",
pending_user_transfer_start = "pending_user_transfer_start",
incomplete = "incomplete",
no_market = "no_market",
too_small = "too_small",
too_large = "too_large",
error = "error",
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export { Types };
*/
export { EffectType } from "./constants/data";
export { KeyType } from "./constants/keys";
export { TransferResponseType } from "./constants/transfers";
export { TransferResponseType, TransactionStatus } from "./constants/transfers";

/**
* Data
Expand Down
3 changes: 2 additions & 1 deletion src/transfers/DepositProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import sinon from "sinon";
import StellarSdk from "stellar-sdk";
import { DepositProvider } from "./DepositProvider";

import { DepositInfo, Transaction, TransactionStatus } from "../types";
import { TransactionStatus } from "../constants/transfers";
import { DepositInfo, Transaction } from "../types";

const originalSetTimeout = global.setTimeout;

Expand Down
3 changes: 2 additions & 1 deletion src/transfers/TransferProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import {
Transaction,
TransactionArgs,
TransactionsArgs,
TransactionStatus,
WatchTransactionArgs,
WithdrawInfo,
} from "../types";

import { TransactionStatus } from "../constants/transfers";

import { parseInfo } from "./parseInfo";

/**
Expand Down
20 changes: 4 additions & 16 deletions src/types/transfers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { TransferResponseType } from "../constants/transfers";
import {
TransactionStatus,
TransferResponseType,
} from "../constants/transfers";
import { WatcherParams } from "./watchers";

export interface GetKycArgs {
Expand Down Expand Up @@ -222,21 +225,6 @@ export interface TransferError extends Error {
originalResponse?: any;
}

export enum TransactionStatus {
completed = "completed",
pending_external = "pending_external",
pending_anchor = "pending_anchor",
pending_stellar = "pending_stellar",
pending_trust = "pending_trust",
pending_user = "pending_user",
pending_user_transfer_start = "pending_user_transfer_start",
incomplete = "incomplete",
no_market = "no_market",
too_small = "too_small",
too_large = "too_large",
error = "error",
}

interface BaseTransaction {
id: string;
status:
Expand Down

0 comments on commit c4d1ce7

Please sign in to comment.