Skip to content

Commit

Permalink
feat: add stacks tx and status model
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Jun 7, 2024
1 parent 90bf6cc commit 974aa25
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/models/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
},
"bugs": "https://github.com/leather-wallet/mono/issues",
"dependencies": {
"@stacks/stacks-blockchain-api-types": "7.8.2",
"bignumber.js": "9.1.2"
},
"devDependencies": {
"@leather-wallet/eslint-config": "workspace:*",
"@leather-wallet/prettier-config": "workspace:*",
"@leather-wallet/tsconfig-config": "workspace:*",
"@types/react": "18.2.79",
"eslint": "8.53.0",
"prettier": "3.3.0",
"tsup": "8.1.0",
Expand Down
13 changes: 4 additions & 9 deletions packages/models/src/transactions/stacks-transaction.model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import type React from 'react';
import type { MempoolTransaction, Transaction } from '@stacks/stacks-blockchain-api-types';

export type StacksTx = MempoolTransaction | Transaction;
export type StacksTxStatus = 'failed' | 'pending' | 'success';

export interface StxTransfer {
amount: string;
Expand All @@ -12,11 +15,3 @@ export interface FtTransfer {
sender?: string;
recipient?: string;
}

export interface TxTransferDetails {
caption: string;
icon: React.ReactNode;
link: string;
title: string;
value: number | string | null;
}
2 changes: 1 addition & 1 deletion packages/query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@stacks/common": "6.13.0",
"@stacks/connect": "7.4.0",
"@stacks/rpc-client": "1.0.3",
"@stacks/stacks-blockchain-api-types": "6.3.4",
"@stacks/stacks-blockchain-api-types": "7.8.2",
"@stacks/transactions": "6.15.0",
"@tanstack/query-sync-storage-persister": "4.35.7",
"@tanstack/react-query": "4.35.7",
Expand Down
15 changes: 5 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 974aa25

Please sign in to comment.