@rpg-engine/long-bow 0.8.232 → 0.8.234
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DCWallet/DCTransferPanel.d.ts +3 -0
- package/dist/components/DCWallet/DCWalletContent.d.ts +3 -0
- package/dist/components/Marketplace/CharacterListingModal.d.ts +1 -0
- package/dist/components/Marketplace/CharacterTradePanel.d.ts +1 -0
- package/dist/components/Marketplace/ManagmentPanel.d.ts +1 -0
- package/dist/components/Marketplace/Marketplace.d.ts +1 -0
- package/dist/components/Marketplace/MyCharacterListingsPanel.d.ts +1 -0
- package/dist/components/Store/CartView.d.ts +11 -1
- package/dist/components/Store/PaymentMethodModal.d.ts +1 -0
- package/dist/components/Store/Store.d.ts +2 -1
- package/dist/components/Store/hooks/useStoreCart.d.ts +2 -1
- package/dist/long-bow.cjs.development.js +146 -82
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +146 -82
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DCWallet/DCTransferPanel.tsx +34 -4
- package/src/components/DCWallet/DCWalletContent.tsx +9 -1
- package/src/components/DCWallet/__test__/DCTransferPanel.spec.tsx +115 -0
- package/src/components/Marketplace/CharacterListingModal.tsx +16 -0
- package/src/components/Marketplace/CharacterTradePanel.tsx +3 -0
- package/src/components/Marketplace/ManagmentPanel.tsx +38 -1
- package/src/components/Marketplace/Marketplace.tsx +2 -1
- package/src/components/Marketplace/MyCharacterListingsPanel.tsx +3 -0
- package/src/components/Marketplace/__test__/CharacterListingModal.spec.tsx +114 -0
- package/src/components/Marketplace/__test__/ManagmentPanel.spec.tsx +125 -0
- package/src/components/Store/CartView.tsx +23 -5
- package/src/components/Store/PaymentMethodModal.tsx +19 -9
- package/src/components/Store/Store.tsx +2 -2
- package/src/components/Store/__test__/CartView.spec.tsx +190 -0
- package/src/components/Store/__test__/PaymentMethodModal.spec.tsx +108 -0
- package/src/components/Store/hooks/useStoreCart.ts +6 -4
- package/src/stories/Features/trading/Marketplace.stories.tsx +2 -1
|
@@ -9,9 +9,12 @@ export interface IDCTransferPanelProps {
|
|
|
9
9
|
transferResult: {
|
|
10
10
|
success: boolean;
|
|
11
11
|
message: string;
|
|
12
|
+
amount?: number;
|
|
13
|
+
fee?: number;
|
|
12
14
|
} | null;
|
|
13
15
|
onSendTransfer: (recipientName: string, amount: number) => void;
|
|
14
16
|
onClearTransferResult: () => void;
|
|
17
|
+
feePercent?: number;
|
|
15
18
|
characterName?: string;
|
|
16
19
|
onInputFocus?: () => void;
|
|
17
20
|
onInputBlur?: () => void;
|
|
@@ -14,7 +14,10 @@ export interface IDCWalletContentProps {
|
|
|
14
14
|
transferResult: {
|
|
15
15
|
success: boolean;
|
|
16
16
|
message: string;
|
|
17
|
+
amount?: number;
|
|
18
|
+
fee?: number;
|
|
17
19
|
} | null;
|
|
20
|
+
feePercent?: number;
|
|
18
21
|
onSendTransfer: (recipientName: string, amount: number) => void;
|
|
19
22
|
onClearTransferResult: () => void;
|
|
20
23
|
characterName?: string;
|
|
@@ -13,6 +13,7 @@ export interface ICharacterListingModalProps {
|
|
|
13
13
|
characterAtlasJSON: any;
|
|
14
14
|
characterAtlasIMG: any;
|
|
15
15
|
onCharacterList: (characterId: string, price: number) => void;
|
|
16
|
+
commissionPercent?: number;
|
|
16
17
|
enableHotkeys?: () => void;
|
|
17
18
|
disableHotkeys?: () => void;
|
|
18
19
|
}
|
|
@@ -20,5 +20,6 @@ export interface IMyCharacterListingsPanelProps {
|
|
|
20
20
|
characterAtlasIMG: any;
|
|
21
21
|
enableHotkeys?: () => void;
|
|
22
22
|
disableHotkeys?: () => void;
|
|
23
|
+
commissionPercent?: number;
|
|
23
24
|
}
|
|
24
25
|
export declare const MyCharacterListingsPanel: React.FC<IMyCharacterListingsPanelProps>;
|
|
@@ -6,11 +6,21 @@ interface ICartItem {
|
|
|
6
6
|
quantity: number;
|
|
7
7
|
metadata?: Record<string, any>;
|
|
8
8
|
}
|
|
9
|
+
export declare type PurchaseResult = {
|
|
10
|
+
status: 'success';
|
|
11
|
+
} | {
|
|
12
|
+
status: 'cancelled';
|
|
13
|
+
} | {
|
|
14
|
+
status: 'failed';
|
|
15
|
+
error?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type LegacyPurchaseResult = boolean;
|
|
18
|
+
export declare type CartPurchaseResult = PurchaseResult | LegacyPurchaseResult;
|
|
9
19
|
export interface ICartViewProps {
|
|
10
20
|
cartItems: ICartItem[];
|
|
11
21
|
onRemoveFromCart: (itemKey: string) => void;
|
|
12
22
|
onClose: () => void;
|
|
13
|
-
onPurchase: () => Promise<
|
|
23
|
+
onPurchase: () => Promise<CartPurchaseResult>;
|
|
14
24
|
atlasJSON: Record<string, any>;
|
|
15
25
|
atlasIMG: string;
|
|
16
26
|
paymentMethodLabel?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IItemPack, IPurchase, IProductBlueprint, UserAccountTypes } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { CartPurchaseResult } from './CartView';
|
|
3
4
|
import { IFeaturedItem } from './FeaturedBanner';
|
|
4
5
|
import { TabId } from './hooks/useStoreTabs';
|
|
5
6
|
export interface IStoreProps {
|
|
@@ -7,7 +8,7 @@ export interface IStoreProps {
|
|
|
7
8
|
packs?: IItemPack[];
|
|
8
9
|
atlasJSON: any;
|
|
9
10
|
atlasIMG: string;
|
|
10
|
-
onPurchase: (purchase: Partial<IPurchase>) => Promise<
|
|
11
|
+
onPurchase: (purchase: Partial<IPurchase>) => Promise<CartPurchaseResult>;
|
|
11
12
|
onShowHistory?: () => void;
|
|
12
13
|
onShowWallet?: () => void;
|
|
13
14
|
walletLabel?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IPurchase, IProductBlueprint } from '@rpg-engine/shared';
|
|
2
|
+
import { CartPurchaseResult } from '../CartView';
|
|
2
3
|
interface ICartItem {
|
|
3
4
|
item: IProductBlueprint;
|
|
4
5
|
quantity: number;
|
|
@@ -9,7 +10,7 @@ interface IUseStoreCart {
|
|
|
9
10
|
isCartOpen: boolean;
|
|
10
11
|
handleAddToCart: (item: IProductBlueprint, quantity: number, metadata?: Record<string, any>) => void;
|
|
11
12
|
handleRemoveFromCart: (itemKey: string) => void;
|
|
12
|
-
handlePurchase: (onPurchase: (purchase: IPurchase) => Promise<
|
|
13
|
+
handlePurchase: (onPurchase: (purchase: IPurchase) => Promise<CartPurchaseResult>) => Promise<CartPurchaseResult>;
|
|
13
14
|
openCart: () => void;
|
|
14
15
|
closeCart: () => void;
|
|
15
16
|
getTotalItems: () => number;
|