@pioneer-platform/pioneer-react 0.2.42 → 0.2.43

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.
Files changed (91) hide show
  1. package/dist/index.d.ts +1 -6
  2. package/dist/index.js +16 -14
  3. package/dist/{index_2ae7b728.js → index_00dd884e.js} +5 -6
  4. package/dist/{index_d62adee3.js → index_089e7234.js} +1 -1
  5. package/dist/{index_6fc14522.js → index_1a6a5598.js} +5 -6
  6. package/dist/{index_5cbed275.js → index_1afbfab1.js} +246 -4473
  7. package/dist/{index_f59a43d2.js → index_2149ed8d.js} +8 -8
  8. package/dist/{index_7f071019.js → index_25e511bb.js} +15 -15
  9. package/dist/{index_b2be5e4e.js → index_28e5444b.js} +3 -4
  10. package/dist/{index_f575e7b4.js → index_31d055bf.js} +8 -9
  11. package/dist/{index_ebeabe97.js → index_3433fe56.js} +3 -4
  12. package/dist/{index_318d1d68.js → index_3ed7e242.js} +28 -28
  13. package/dist/{index_0d526d38.js → index_3fea9d52.js} +19 -19
  14. package/dist/{index_47b407db.js → index_40cbc1cb.js} +4 -5
  15. package/dist/{index_7d621758.js → index_40f2115a.js} +3 -4
  16. package/dist/{index_ed259edc.js → index_47217799.js} +5 -6
  17. package/dist/{index_5d556ec6.js → index_51bbd44a.js} +3 -4
  18. package/dist/{index_8e0864da.js → index_53605da3.js} +2 -2
  19. package/dist/{index_45b009da.js → index_5c12821e.js} +10 -11
  20. package/dist/{index_9fef85a2.js → index_5dc59e18.js} +3 -4
  21. package/dist/{index_ac8af4f0.js → index_61702928.js} +3 -4
  22. package/dist/{index_4b36612f.js → index_64ff18e7.js} +1 -1
  23. package/dist/{index_13b1e6a1.js → index_65017d87.js} +1 -1
  24. package/dist/{index_b752bc5a.js → index_6becad0b.js} +13 -13
  25. package/dist/{index_89463ea0.js → index_740490f1.js} +4 -5
  26. package/dist/{index_de955e45.js → index_75f700d8.js} +4 -5
  27. package/dist/{index_e525ec6b.js → index_7640e861.js} +8 -453
  28. package/dist/{index_d85153be.js → index_7c11b3c7.js} +3 -3
  29. package/dist/{index_61bfdb70.js → index_7c574e7d.js} +8 -9
  30. package/dist/{index_97f1ff39.js → index_7ddfebf7.js} +14 -14
  31. package/dist/{index_e47e2842.js → index_81dd7d0f.js} +7 -8
  32. package/dist/{index_a005a882.js → index_87afedd4.js} +8 -8
  33. package/dist/{index_0bbcbffb.js → index_87d14dd6.js} +6 -7
  34. package/dist/{index_aa947e34.js → index_9346dd3d.js} +7 -7
  35. package/dist/{index_70cc14bd.js → index_96d5aad1.js} +1223 -40
  36. package/dist/{index_ff288a7a.js → index_97081f9b.js} +7 -8
  37. package/dist/{index_4c07ec7c.js → index_9c378228.js} +11 -13
  38. package/dist/{index_54e4e367.js → index_a96dcbb2.js} +13 -13
  39. package/dist/{index_265bb459.js → index_a9d0b958.js} +29 -52
  40. package/dist/{index_d869d4f8.js → index_abaa7487.js} +6 -7
  41. package/dist/{index_d90e262e.js → index_b1b7d385.js} +13 -13
  42. package/dist/index_b4b501fc.js +449 -0
  43. package/dist/index_b62d8ff4.js +30 -0
  44. package/dist/{index_81d780b7.js → index_b6e5a809.js} +1 -1
  45. package/dist/{index_6424cb67.js → index_bd7bbccf.js} +2 -4
  46. package/dist/{index_381aee34.js → index_c2bc068c.js} +1 -1
  47. package/dist/{index_7861fcf0.js → index_c587fd1b.js} +3 -4
  48. package/dist/{index_239b8e07.js → index_c8c2dada.js} +1 -1
  49. package/dist/{index_bfa7b443.js → index_d26b5754.js} +7 -8
  50. package/dist/{index_015b6eba.js → index_d77fc157.js} +6154 -32027
  51. package/dist/{index_e4776b9a.js → index_db264e60.js} +13 -13
  52. package/dist/{index_2143ad7f.js → index_f044b02a.js} +1 -1
  53. package/dist/{index_1d49c612.js → index_fad80d95.js} +4 -5
  54. package/dist/lib/components/pioneer/Pioneer/Balances.js +4 -4
  55. package/dist/lib/components/pioneer/Pioneer/Paths.js +4 -4
  56. package/dist/lib/components/pioneer/Pioneer/Pubkeys.js +4 -4
  57. package/dist/lib/components/pioneer/Pioneer/Send.js +1 -1
  58. package/dist/lib/components/pioneer/Pioneer/Wallets.js +1 -1
  59. package/dist/lib/components/pioneer/index.js +7 -7
  60. package/dist/lib/pages/home/index.js +2 -9
  61. package/package.json +1 -1
  62. package/src/index.tsx +19 -19
  63. package/src/lib/components/pioneer/Pioneer/Balances.tsx +4 -4
  64. package/src/lib/components/pioneer/Pioneer/Paths.tsx +4 -4
  65. package/src/lib/components/pioneer/Pioneer/Pubkeys.tsx +4 -4
  66. package/src/lib/components/pioneer/Pioneer/Send.tsx +1 -1
  67. package/src/lib/components/pioneer/Pioneer/Wallets.tsx +2 -2
  68. package/src/lib/components/pioneer/index.tsx +6 -41
  69. package/src/lib/pages/home/index.tsx +5 -5
  70. package/dist/index_bbcb3c14.js +0 -31
  71. package/dist/lib/components/AssetSelect/index.d.ts +0 -4
  72. package/dist/lib/components/AssetSelect/index.js +0 -72
  73. package/dist/lib/components/BlockchainSelect/index.d.ts +0 -4
  74. package/dist/lib/components/BlockchainSelect/index.js +0 -88
  75. package/dist/lib/components/MiddleEllipsis/index.d.ts +0 -6
  76. package/dist/lib/components/MiddleEllipsis/index.js +0 -12
  77. package/dist/lib/components/Onboarding/index.d.ts +0 -6
  78. package/dist/lib/components/Onboarding/index.js +0 -113
  79. package/dist/lib/components/WalletSelect/index.d.ts +0 -4
  80. package/dist/lib/components/WalletSelect/index.js +0 -62
  81. package/dist/lib/components/modals/AssetModal.d.ts +0 -7
  82. package/dist/lib/components/modals/AssetModal.js +0 -28
  83. package/dist/lib/components/modals/SettingsModal.d.ts +0 -7
  84. package/dist/lib/components/modals/SettingsModal.js +0 -33
  85. package/src/lib/components/AssetSelect/index.tsx +0 -168
  86. package/src/lib/components/BlockchainSelect/index.tsx +0 -166
  87. package/src/lib/components/MiddleEllipsis/index.tsx +0 -27
  88. package/src/lib/components/Onboarding/index.tsx +0 -251
  89. package/src/lib/components/WalletSelect/index.tsx +0 -112
  90. package/src/lib/components/modals/AssetModal.tsx +0 -67
  91. package/src/lib/components/modals/SettingsModal.tsx +0 -95
@@ -1,19 +1,19 @@
1
- import { H as H1 } from "./index_2143ad7f.js";
2
- import { c as commonjsGlobal, d as dist, r as requireCryptoBrowserify, e as getAugmentedNamespace } from "./index_265bb459.js";
3
- import { S as Sg, Y as Yi } from "./index_e525ec6b.js";
4
- import { F as Fg } from "./index_13b1e6a1.js";
5
- import "./index_015b6eba.js";
1
+ import { H as H1 } from "./index_f044b02a.js";
2
+ import { c as commonjsGlobal, d as dist, r as requireCryptoBrowserify, e as getAugmentedNamespace } from "./index_a9d0b958.js";
3
+ import { S as Sg } from "./index_7640e861.js";
4
+ import { F as Fg } from "./index_65017d87.js";
5
+ import { Y as Yi } from "./index_b4b501fc.js";
6
+ import "./index_d77fc157.js";
6
7
  import "react";
7
8
  import "@chakra-ui/react";
8
- import "@emotion/react";
9
9
  import "./index_86436d56.js";
10
- import "./index_6424cb67.js";
11
- import "./index_70cc14bd.js";
12
- import "./index_5cbed275.js";
13
- import "./index_4b36612f.js";
14
- import "./index_8e0864da.js";
15
- import "./index_d85153be.js";
16
- const __dirname = "/Users/highlander/WebstormProjects/pioneer-react-v2/node_modules/.pnpm/registry.npmjs.org+@coinmasters+wallet-ledger@3.0.0_@coinmasters+helpers@3.0.0_@coinmasters+t_erci7cvzfh4iqduiqwhy6rju34/node_modules/@coinmasters/wallet-ledger/dist";
10
+ import "./index_bd7bbccf.js";
11
+ import "./index_96d5aad1.js";
12
+ import "./index_1afbfab1.js";
13
+ import "./index_64ff18e7.js";
14
+ import "./index_53605da3.js";
15
+ import "./index_7c11b3c7.js";
16
+ const __dirname = "/Users/highlander/WebstormProjects/pioneer-react-v2/node_modules/.pnpm/@coinmasters+wallet-ledger@3.0.0_@coinmasters+helpers@3.0.0_@coinmasters+toolbox-cosmos@3.0.0_7xcnvjybiyblksvwvr72jh6oo4/node_modules/@coinmasters/wallet-ledger/dist";
17
17
  function Hi(O, AA) {
18
18
  for (var IA = 0; IA < AA.length; IA++) {
19
19
  const wA = AA[IA];
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, n as base64Js, f as bech32$2, g as getDefaultExportFromCjs } from "./index_015b6eba.js";
1
+ import { c as commonjsGlobal, a as base64Js, d as bech32$2, g as getDefaultExportFromCjs } from "./index_d77fc157.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -1,11 +1,10 @@
1
- import { j as commonjsGlobal, C as bnExports$1, x as requireElliptic, q as dist, E as requireCryptoBrowserify, r as build, F as getAugmentedNamespace } from "./index_318d1d68.js";
1
+ import { j as commonjsGlobal, N as bnExports$1, x as requireElliptic, q as dist, O as requireCryptoBrowserify, r as build, P as getAugmentedNamespace } from "./index_3ed7e242.js";
2
2
  import "./index_86436d56.js";
3
- import "./index_4b36612f.js";
4
- import "./index_015b6eba.js";
3
+ import "./index_64ff18e7.js";
4
+ import "./index_d77fc157.js";
5
5
  import "react";
6
6
  import "@chakra-ui/react";
7
- import "@emotion/react";
8
- const __dirname = "/Users/highlander/WebstormProjects/pioneer-react-v2/node_modules/.pnpm/registry.npmjs.org+@coinmasters+toolbox-cosmos@3.0.0_@coinmasters+helpers@3.0.0/node_modules/@coinmasters/toolbox-cosmos/dist";
7
+ const __dirname = "/Users/highlander/WebstormProjects/pioneer-react-v2/node_modules/.pnpm/@coinmasters+toolbox-cosmos@3.0.0_@coinmasters+helpers@3.0.0/node_modules/@coinmasters/toolbox-cosmos/dist";
9
8
  function zi(O, q) {
10
9
  for (var nA = 0; nA < q.length; nA++) {
11
10
  const mA = q[nA];
@@ -3,12 +3,12 @@ import { Search2Icon } from "@chakra-ui/icons";
3
3
  import { Avatar, AvatarBadge, Box, Button, HStack, Stack, Image, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalFooter, useDisclosure, InputGroup, InputLeftElement, Input, } from "@chakra-ui/react";
4
4
  import { useState, useEffect } from "react";
5
5
  //@ts-ignore
6
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
6
+ import KEEPKEY_ICON from "../../../assets/png/keepkey.png";
7
7
  //@ts-ignore
8
- import METAMASK_ICON from "lib/assets/png/metamask.png";
8
+ import METAMASK_ICON from "../../../assets/png/metamask.png";
9
9
  //@ts-ignore
10
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
11
- import { usePioneer } from "lib/context/Pioneer";
10
+ import PIONEER_ICON from "../../../assets/png/pioneer.png";
11
+ import { usePioneer } from "../../../context/Pioneer";
12
12
  import Receive from "./Receive";
13
13
  import Send from "./Send";
14
14
  import View from "./View";
@@ -3,12 +3,12 @@ import { Search2Icon } from "@chakra-ui/icons";
3
3
  import { Avatar, AvatarBadge, Box, Button, HStack, Stack, Image, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalFooter, useDisclosure, InputGroup, InputLeftElement, Input, } from "@chakra-ui/react";
4
4
  import { useState, useEffect } from "react";
5
5
  //@ts-ignore
6
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
6
+ import KEEPKEY_ICON from "../../../assets/png/keepkey.png";
7
7
  //@ts-ignore
8
- import METAMASK_ICON from "lib/assets/png/metamask.png";
8
+ import METAMASK_ICON from "../../../assets/png/metamask.png";
9
9
  //@ts-ignore
10
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
11
- import { usePioneer } from "lib/context/Pioneer";
10
+ import PIONEER_ICON from "../../../assets/png/pioneer.png";
11
+ import { usePioneer } from "../../../context/Pioneer";
12
12
  import Receive from "./Receive";
13
13
  import Send from "./Send";
14
14
  import View from "./View";
@@ -3,12 +3,12 @@ import { Search2Icon } from "@chakra-ui/icons";
3
3
  import { Avatar, AvatarBadge, Box, Button, HStack, Stack, Image, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalFooter, useDisclosure, InputGroup, InputLeftElement, Input, } from "@chakra-ui/react";
4
4
  import { useState, useEffect } from "react";
5
5
  //@ts-ignore
6
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
6
+ import KEEPKEY_ICON from "../../../assets/png/keepkey.png";
7
7
  //@ts-ignore
8
- import METAMASK_ICON from "lib/assets/png/metamask.png";
8
+ import METAMASK_ICON from "../../../assets/png/metamask.png";
9
9
  //@ts-ignore
10
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
11
- import { usePioneer } from "lib/context/Pioneer";
10
+ import PIONEER_ICON from "../../../assets/png/pioneer.png";
11
+ import { usePioneer } from "../../../context/Pioneer";
12
12
  import Receive from "./Receive";
13
13
  import Send from "./Send";
14
14
  import View from "./View";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Card, Button, FormControl, FormLabel, Input, Spinner, Avatar, } from "@chakra-ui/react";
3
3
  import { useState, useEffect } from "react";
4
- import { usePioneer } from "lib/context/Pioneer";
4
+ import { usePioneer } from "../../../context/Pioneer";
5
5
  const Send = (Asset) => {
6
6
  const { state, dispatch } = usePioneer();
7
7
  const { user, app, api, wallet } = state;
@@ -3,7 +3,7 @@ import { Avatar, Badge, Box, Button, Card, HStack, Text, VStack, } from "@chakra
3
3
  import { useEffect, useState } from "react";
4
4
  import { useNavigate } from "react-router-dom";
5
5
  // import ShowWallets from "../components/Wallets";
6
- import { usePioneer } from "lib/context/Pioneer";
6
+ import { usePioneer } from "../../../context/Pioneer";
7
7
  export default function Wallets({ wallets }) {
8
8
  const navigate = useNavigate();
9
9
  const { state, connectWallet } = usePioneer();
@@ -5,14 +5,14 @@ import { FaCog } from "react-icons/fa";
5
5
  // import {Img} from "react-image";
6
6
  // import {KeepKeyIcon} from "lib/assets/Icons/KeepKeyIcon";
7
7
  // @ts-ignore
8
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
8
+ import KEEPKEY_ICON from "../../assets/png/keepkey.png";
9
9
  // @ts-ignore
10
- import METAMASK_ICON from "lib/assets/png/metamask.png";
10
+ import METAMASK_ICON from "../../assets/png/metamask.png";
11
11
  // @ts-ignore
12
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
13
- import SettingsModal from "lib/components/modals/SettingsModal";
14
- import { MiddleEllipsis } from "lib/components/utils";
15
- import { usePioneer } from "lib/context/Pioneer";
12
+ import PIONEER_ICON from "../../assets/png/pioneer.png";
13
+ //@ts-ignore
14
+ import { MiddleEllipsis } from "../utils";
15
+ import { usePioneer } from "../../context/Pioneer";
16
16
  const getWalletType = (user, context) => {
17
17
  if (user && user.walletDescriptions) {
18
18
  const wallet = user.walletDescriptions.find((w) => w.id === context);
@@ -149,6 +149,6 @@ const Pioneer = () => {
149
149
  setPubkeyContext(app?.pubkeyContext?.master || app?.pubkeyContext?.pubkey);
150
150
  }, [app?.pubkeyContext?.pubkey]); // once on startup
151
151
  const avatarContent = api ? (getWalletBadgeContent(walletType)) : (_jsx(AvatarBadge, { boxSize: "1em", bg: "red.500", children: _jsx(CircularProgress, { isIndeterminate: true, size: "1em", color: "white" }) }));
152
- return (_jsxs(Menu, { children: [_jsx(MenuButton, { as: Button, rounded: "full", variant: "link", cursor: "pointer", minW: 100, children: _jsx(Avatar, { size: "lg", children: isPioneer ? (_jsx(Avatar, { size: "lg", src: pioneerImage, children: avatarContent })) : (_jsx(Avatar, { size: "lg", src: PIONEER_ICON, children: avatarContent })) }) }), _jsxs(MenuList, { children: [_jsx(Box, { borderBottomWidth: "1px", p: "4", children: _jsxs(HStack, { justifyContent: "space-between", children: [_jsx(Button, { leftIcon: _jsx(Avatar, { size: "xs", src: getWalletSettingsContent(walletType), children: _jsx(AvatarBadge, { boxSize: "0.75em", bg: "green.500" }) }), children: _jsx("small", { children: _jsx(MiddleEllipsis, { text: context }) }) }), _jsx(IconButton, { icon: _jsx(FaCog, {}), isRound: true, onClick: () => settingsSelected(), "aria-label": "Settings" }), _jsx(SettingsModal, { isOpen: isOpen, onClose: onClose })] }) }), _jsx(Box, { borderWidth: "1px", borderRadius: "md", p: "4", textAlign: "left", maxWidth: "300px", width: "100%", children: _jsxs("div", { children: [_jsx(Flex, { alignItems: "center", children: _jsxs("small", { children: ["status: ", status] }) }), _jsxs(Card, { p: 2, borderRadius: "md", boxShadow: "sm", mb: 2, className: "caip", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(Avatar, { size: "md", src: app?.assetContext?.image, mr: 2 }), _jsx(Box, { fontSize: "sm", fontWeight: "bold", children: "Asset:" })] }), _jsx(Box, { fontSize: "sm", textAlign: "right", children: app?.assetContext?.symbol })] }), _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Box, { fontSize: "xs" }), _jsxs(Box, { fontSize: "xs", textAlign: "right", children: ["caip:", _jsx(MiddleEllipsis, { text: app?.assetContext?.caip })] })] })] }), _jsxs(Card, { p: 2, borderRadius: "md", boxShadow: "sm", mb: 2, className: "caip", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(Avatar, { size: "md", src: app?.blockchainContext?.image, mr: 2 }), _jsx(Box, { fontSize: "sm", fontWeight: "bold", children: "Blockchain:" })] }), _jsx(Box, { fontSize: "sm", textAlign: "right", children: app?.blockchainContext?.name })] }), _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Box, { fontSize: "xs" }), _jsxs(Box, { fontSize: "xs", textAlign: "right", children: ["caip:", _jsx(MiddleEllipsis, { text: app?.blockchainContext?.caip })] })] })] }), _jsxs(Card, { p: 2, borderRadius: "md", boxShadow: "sm", className: "caip", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [_jsx(Flex, { alignItems: "center", children: _jsx(Box, { fontSize: "sm", fontWeight: "bold", children: "Pubkey Path:" }) }), _jsx(Box, { fontSize: "sm", textAlign: "right", children: _jsx(MiddleEllipsis, { text: app?.pubkeyContext?.path }) })] }), _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Box, { fontSize: "xs", children: "Pubkey:" }), _jsx(Box, { fontSize: "xs", textAlign: "right", children: _jsx(MiddleEllipsis, { text: app?.pubkeyContext?.pubkey }) })] })] })] }) }), _jsx(MenuItem, { children: _jsx(SimpleGrid, { columns: 3, row: 1, children: renderWallets() }) })] })] }));
152
+ return (_jsxs(Menu, { children: [_jsx(MenuButton, { as: Button, rounded: "full", variant: "link", cursor: "pointer", minW: 100, children: _jsx(Avatar, { size: "lg", children: isPioneer ? (_jsx(Avatar, { size: "lg", src: pioneerImage, children: avatarContent })) : (_jsx(Avatar, { size: "lg", src: PIONEER_ICON, children: avatarContent })) }) }), _jsxs(MenuList, { children: [_jsx(Box, { borderBottomWidth: "1px", p: "4", children: _jsxs(HStack, { justifyContent: "space-between", children: [_jsx(Button, { leftIcon: _jsx(Avatar, { size: "xs", src: getWalletSettingsContent(walletType), children: _jsx(AvatarBadge, { boxSize: "0.75em", bg: "green.500" }) }), children: _jsx("small", { children: _jsx(MiddleEllipsis, { text: context }) }) }), _jsx(IconButton, { icon: _jsx(FaCog, {}), isRound: true, onClick: () => settingsSelected(), "aria-label": "Settings" })] }) }), _jsx(Box, { borderWidth: "1px", borderRadius: "md", p: "4", textAlign: "left", maxWidth: "300px", width: "100%", children: _jsxs("div", { children: [_jsx(Flex, { alignItems: "center", children: _jsxs("small", { children: ["status: ", status] }) }), _jsxs(Card, { p: 2, borderRadius: "md", boxShadow: "sm", mb: 2, className: "caip", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(Avatar, { size: "md", src: app?.assetContext?.image, mr: 2 }), _jsx(Box, { fontSize: "sm", fontWeight: "bold", children: "Asset:" })] }), _jsx(Box, { fontSize: "sm", textAlign: "right", children: app?.assetContext?.symbol })] }), _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Box, { fontSize: "xs" }), _jsxs(Box, { fontSize: "xs", textAlign: "right", children: ["caip:", _jsx(MiddleEllipsis, { text: app?.assetContext?.caip })] })] })] }), _jsxs(Card, { p: 2, borderRadius: "md", boxShadow: "sm", mb: 2, className: "caip", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(Avatar, { size: "md", src: app?.blockchainContext?.image, mr: 2 }), _jsx(Box, { fontSize: "sm", fontWeight: "bold", children: "Blockchain:" })] }), _jsx(Box, { fontSize: "sm", textAlign: "right", children: app?.blockchainContext?.name })] }), _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Box, { fontSize: "xs" }), _jsxs(Box, { fontSize: "xs", textAlign: "right", children: ["caip:", _jsx(MiddleEllipsis, { text: app?.blockchainContext?.caip })] })] })] }), _jsxs(Card, { p: 2, borderRadius: "md", boxShadow: "sm", className: "caip", children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [_jsx(Flex, { alignItems: "center", children: _jsx(Box, { fontSize: "sm", fontWeight: "bold", children: "Pubkey Path:" }) }), _jsx(Box, { fontSize: "sm", textAlign: "right", children: _jsx(MiddleEllipsis, { text: app?.pubkeyContext?.path }) })] }), _jsxs(Flex, { justifyContent: "space-between", children: [_jsx(Box, { fontSize: "xs", children: "Pubkey:" }), _jsx(Box, { fontSize: "xs", textAlign: "right", children: _jsx(MiddleEllipsis, { text: app?.pubkeyContext?.pubkey }) })] })] })] }) }), _jsx(MenuItem, { children: _jsx(SimpleGrid, { columns: 3, row: 1, children: renderWallets() }) })] })] }));
153
153
  };
154
154
  export default Pioneer;
@@ -3,15 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Button, useDisclosure, Modal, ModalFooter, ModalBody, ModalCloseButton, ModalOverlay, ModalContent, ModalHeader, Tabs, TabList, TabPanels, Tab, TabPanel, } from "@chakra-ui/react";
4
4
  // eslint-disable-next-line import/no-extraneous-dependencies
5
5
  import { useEffect, useState } from "react";
6
- import AssetSelect from "lib/components/AssetSelect";
6
+ // import AssetSelect from "lib/components/AssetSelect";
7
7
  import { usePioneer } from "lib/context/Pioneer";
8
- // import OutputSelect from "lib/components/OutputSelect";
9
- // import BlockchainSelect from "lib/components/BlockchainSelect";
10
- // import WalletSelect from "lib/components/WalletSelect";
11
- import Balances from "./components/Balances";
12
- import Basic from "./components/Basic";
13
- // // import Pubkeys from "./components/Pubkeys";
14
- import Transfer from "./components/Transfer";
15
8
  // import Swap from "./components/Swap";
16
9
  const Home = () => {
17
10
  const { state, onStart } = usePioneer();
@@ -53,6 +46,6 @@ const Home = () => {
53
46
  setAddress(pubkeyContext?.master || pubkeyContext?.pubkey || pubkeyContext);
54
47
  // console.log("pubkeyContext: ", pubkeyContext);
55
48
  };
56
- return (_jsxs("div", { children: [_jsxs(Modal, { isOpen: isOpen, onClose: () => onClose(), size: "xl", children: [_jsx(ModalOverlay, {}), _jsxs(ModalContent, { children: [_jsx(ModalHeader, { children: modalType }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { children: modalType === "Select Asset" && (_jsx("div", { children: _jsx(AssetSelect, { onClose: onClose }) })) }), _jsx(ModalFooter, { children: _jsx(Button, { colorScheme: "blue", onClick: onClose, children: "Close" }) })] })] }), address, _jsxs(Tabs, { children: [_jsxs(TabList, { children: [_jsx(Tab, { children: "Context" }), _jsx(Tab, { children: "balances" }), _jsx(Tab, { children: "Transfer" }), _jsx(Tab, { children: "Swaps" }), _jsx(Tab, { children: "Earn" }), _jsx(Tab, { children: "Borrow" })] }), _jsxs(TabPanels, { children: [_jsx(TabPanel, { children: _jsx(Basic, {}) }), _jsx(TabPanel, { children: _jsx(Balances, {}) }), _jsx(TabPanel, { children: _jsx(Transfer, { openModal: openModal }) }), _jsx(TabPanel, {}), _jsx(TabPanel, { children: _jsx("p", { children: "Earn" }) }), _jsx(TabPanel, { children: _jsx("p", { children: "Borrow" }) })] })] }), _jsx(Button, { onClick: refresh, children: "refresh" })] }));
49
+ return (_jsxs("div", { children: [_jsxs(Modal, { isOpen: isOpen, onClose: () => onClose(), size: "xl", children: [_jsx(ModalOverlay, {}), _jsxs(ModalContent, { children: [_jsx(ModalHeader, { children: modalType }), _jsx(ModalCloseButton, {}), _jsx(ModalBody, { children: modalType === "Select Asset" && (_jsx("div", {})) }), _jsx(ModalFooter, { children: _jsx(Button, { colorScheme: "blue", onClick: onClose, children: "Close" }) })] })] }), address, _jsxs(Tabs, { children: [_jsxs(TabList, { children: [_jsx(Tab, { children: "Context" }), _jsx(Tab, { children: "balances" }), _jsx(Tab, { children: "Transfer" }), _jsx(Tab, { children: "Swaps" }), _jsx(Tab, { children: "Earn" }), _jsx(Tab, { children: "Borrow" })] }), _jsxs(TabPanels, { children: [_jsx(TabPanel, {}), _jsx(TabPanel, {}), _jsx(TabPanel, {}), _jsx(TabPanel, {}), _jsx(TabPanel, { children: _jsx("p", { children: "Earn" }) }), _jsx(TabPanel, { children: _jsx("p", { children: "Borrow" }) })] })] }), _jsx(Button, { onClick: refresh, children: "refresh" })] }));
57
50
  };
58
51
  export default Home;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-react",
3
- "version": "0.2.42",
3
+ "version": "0.2.43",
4
4
  "author": "highlander",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
package/src/index.tsx CHANGED
@@ -8,25 +8,25 @@ import "@fontsource/plus-jakarta-sans/latin.css";
8
8
  import Pioneer from "lib/components/pioneer";
9
9
  import { PioneerProvider, usePioneer } from "lib/context/Pioneer";
10
10
  import { theme } from "lib/styles/theme";
11
- import Balances from "lib/components/pioneer/Pioneer/Balances";
12
- import AssetSelect from "lib/components/AssetSelect";
13
- import WalletSelect from "lib/components/WalletSelect";
14
- import BlockchainSelect from "lib/components/AssetSelect";
15
- import MiddleEllipsis from "lib/components/MiddleEllipsis";
11
+ // import Balances from "lib/components/pioneer/Pioneer/Balances";
12
+ // import AssetSelect from "lib/components/AssetSelect";
13
+ // import WalletSelect from "lib/components/WalletSelect";
14
+ // import BlockchainSelect from "lib/components/AssetSelect";
15
+ // import MiddleEllipsis from "lib/components/MiddleEllipsis";
16
16
 
17
17
  import App from "./App";
18
18
 
19
19
  // To publish comment out, to run as dev uncomment
20
20
 
21
- const root = ReactDOM.createRoot(
22
- document.getElementById("root") as HTMLElement
23
- );
24
- root.render(
25
- <>
26
- <ColorModeScript initialColorMode={theme.config?.initialColorMode} />
27
- <App />
28
- </>
29
- );
21
+ // const root = ReactDOM.createRoot(
22
+ // document.getElementById("root") as HTMLElement
23
+ // );
24
+ // root.render(
25
+ // <>
26
+ // <ColorModeScript initialColorMode={theme.config?.initialColorMode} />
27
+ // <App />
28
+ // </>
29
+ // );
30
30
 
31
31
  //end dev mode
32
32
 
@@ -34,9 +34,9 @@ export {
34
34
  Pioneer,
35
35
  PioneerProvider,
36
36
  usePioneer,
37
- Balances,
38
- BlockchainSelect,
39
- WalletSelect,
40
- AssetSelect,
41
- MiddleEllipsis,
37
+ // Balances,
38
+ // BlockchainSelect,
39
+ // WalletSelect,
40
+ // AssetSelect,
41
+ // MiddleEllipsis,
42
42
  };
@@ -21,12 +21,12 @@ import {
21
21
  } from "@chakra-ui/react";
22
22
  import React, { useState, useEffect } from "react";
23
23
  //@ts-ignore
24
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
24
+ import KEEPKEY_ICON from "../../../assets/png/keepkey.png";
25
25
  //@ts-ignore
26
- import METAMASK_ICON from "lib/assets/png/metamask.png";
26
+ import METAMASK_ICON from "../../../assets/png/metamask.png";
27
27
  //@ts-ignore
28
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
29
- import { usePioneer } from "lib/context/Pioneer";
28
+ import PIONEER_ICON from "../../../assets/png/pioneer.png";
29
+ import { usePioneer } from "../../../context/Pioneer";
30
30
 
31
31
  import Receive from "./Receive";
32
32
  import Send from "./Send";
@@ -21,12 +21,12 @@ import {
21
21
  } from "@chakra-ui/react";
22
22
  import React, { useState, useEffect } from "react";
23
23
  //@ts-ignore
24
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
24
+ import KEEPKEY_ICON from "../../../assets/png/keepkey.png";
25
25
  //@ts-ignore
26
- import METAMASK_ICON from "lib/assets/png/metamask.png";
26
+ import METAMASK_ICON from "../../../assets/png/metamask.png";
27
27
  //@ts-ignore
28
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
29
- import { usePioneer } from "lib/context/Pioneer";
28
+ import PIONEER_ICON from "../../../assets/png/pioneer.png";
29
+ import { usePioneer } from "../../../context/Pioneer";
30
30
 
31
31
  import Receive from "./Receive";
32
32
  import Send from "./Send";
@@ -21,12 +21,12 @@ import {
21
21
  } from "@chakra-ui/react";
22
22
  import React, { useState, useEffect } from "react";
23
23
  //@ts-ignore
24
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
24
+ import KEEPKEY_ICON from "../../../assets/png/keepkey.png";
25
25
  //@ts-ignore
26
- import METAMASK_ICON from "lib/assets/png/metamask.png";
26
+ import METAMASK_ICON from "../../../assets/png/metamask.png";
27
27
  //@ts-ignore
28
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
29
- import { usePioneer } from "lib/context/Pioneer";
28
+ import PIONEER_ICON from "../../../assets/png/pioneer.png";
29
+ import { usePioneer } from "../../../context/Pioneer";
30
30
 
31
31
  import Receive from "./Receive";
32
32
  import Send from "./Send";
@@ -9,7 +9,7 @@ import {
9
9
  } from "@chakra-ui/react";
10
10
  import React, { useState, useEffect } from "react";
11
11
 
12
- import { usePioneer } from "lib/context/Pioneer";
12
+ import { usePioneer } from "../../../context/Pioneer";
13
13
 
14
14
  const Send = (Asset: any) => {
15
15
  const { state, dispatch } = usePioneer();
@@ -21,9 +21,9 @@ import { useNavigate } from "react-router-dom";
21
21
 
22
22
  // Import the image from the assets
23
23
  // @ts-ignore
24
- import blueMoonImage from "lib/assets/png/blueMoon.png";
24
+ import blueMoonImage from "../../../assets/png/blueMoon.png";
25
25
  // import ShowWallets from "../components/Wallets";
26
- import { usePioneer } from "lib/context/Pioneer";
26
+ import { usePioneer } from "../../../context/Pioneer";
27
27
 
28
28
 
29
29
  export default function Wallets({ wallets }: any) {
@@ -1,17 +1,5 @@
1
1
  import {
2
- chakra,
3
- Stack,
4
2
  CircularProgress,
5
- Drawer,
6
- DrawerOverlay,
7
- DrawerContent,
8
- DrawerHeader,
9
- DrawerBody,
10
- Tabs,
11
- TabList,
12
- TabPanels,
13
- Tab,
14
- TabPanel,
15
3
  Avatar,
16
4
  AvatarBadge,
17
5
  Box,
@@ -19,36 +7,15 @@ import {
19
7
  Flex,
20
8
  HStack,
21
9
  IconButton,
22
- Link,
23
10
  Menu,
24
11
  Image,
25
12
  MenuButton,
26
- MenuDivider,
27
- Icon,
28
13
  MenuItem,
29
14
  MenuList,
30
- Spacer,
31
- Text,
32
15
  useDisclosure,
33
- Accordion,
34
- AccordionItem,
35
- AccordionButton,
36
- AccordionIcon,
37
- AccordionPanel,
38
16
  SimpleGrid,
39
17
  Card,
40
- CardHeader,
41
- Heading,
42
18
  CardBody,
43
- CardFooter,
44
- Modal,
45
- ModalOverlay,
46
- ModalContent,
47
- ModalHeader,
48
- ModalCloseButton,
49
- ModalBody,
50
- ModalFooter,
51
- Select,
52
19
  } from "@chakra-ui/react";
53
20
  import { JSXElementConstructor, Key, ReactElement, ReactFragment,
54
21
  SetStateAction,
@@ -60,16 +27,14 @@ import {FaCog} from "react-icons/fa";
60
27
  // import {Img} from "react-image";
61
28
  // import {KeepKeyIcon} from "lib/assets/Icons/KeepKeyIcon";
62
29
  // @ts-ignore
63
- import KEEPKEY_ICON from "lib/assets/png/keepkey.png";
30
+ import KEEPKEY_ICON from "../../assets/png/keepkey.png";
64
31
  // @ts-ignore
65
- import METAMASK_ICON from "lib/assets/png/metamask.png";
32
+ import METAMASK_ICON from "../../assets/png/metamask.png";
66
33
  // @ts-ignore
67
- import PIONEER_ICON from "lib/assets/png/pioneer.png";
34
+ import PIONEER_ICON from "../../assets/png/pioneer.png";
68
35
  //@ts-ignore
69
- import {ModalContext} from "lib/components/modals";
70
- import SettingsModal from "lib/components/modals/SettingsModal";
71
- import {MiddleEllipsis} from "lib/components/utils";
72
- import {usePioneer} from "lib/context/Pioneer";
36
+ import {MiddleEllipsis} from "../utils";
37
+ import {usePioneer} from "../../context/Pioneer";
73
38
 
74
39
  import Balances from "./Pioneer/Balances";
75
40
  import Wallets from "./Pioneer/Wallets";
@@ -298,7 +263,7 @@ const Pioneer = () => {
298
263
  onClick={() => settingsSelected()}
299
264
  aria-label="Settings"
300
265
  />
301
- <SettingsModal isOpen={isOpen} onClose={onClose} />
266
+ {/*<SettingsModal isOpen={isOpen} onClose={onClose} />*/}
302
267
  </HStack>
303
268
  </Box>
304
269
  <Box
@@ -19,7 +19,7 @@ import {
19
19
  // eslint-disable-next-line import/no-extraneous-dependencies
20
20
  import { useEffect, useState } from "react";
21
21
 
22
- import AssetSelect from "lib/components/AssetSelect";
22
+ // import AssetSelect from "lib/components/AssetSelect";
23
23
  import { usePioneer } from "lib/context/Pioneer";
24
24
 
25
25
  // import OutputSelect from "lib/components/OutputSelect";
@@ -97,7 +97,7 @@ const Home = () => {
97
97
  {/* )} */}
98
98
  {modalType === "Select Asset" && (
99
99
  <div>
100
- <AssetSelect onClose={onClose} />
100
+ {/*<AssetSelect onClose={onClose} />*/}
101
101
  </div>
102
102
  )}
103
103
  {/* {modalType === "Select Blockchain" && ( */}
@@ -136,13 +136,13 @@ const Home = () => {
136
136
 
137
137
  <TabPanels>
138
138
  <TabPanel>
139
- <Basic />
139
+ {/*<Basic />*/}
140
140
  </TabPanel>
141
141
  <TabPanel>
142
- <Balances />
142
+ {/*<Balances />*/}
143
143
  </TabPanel>
144
144
  <TabPanel>
145
- <Transfer openModal={openModal} />
145
+ {/*<Transfer openModal={openModal} />*/}
146
146
  </TabPanel>
147
147
  <TabPanel>{/* <Swap openModal={openModal}></Swap> */}</TabPanel>
148
148
  <TabPanel>
@@ -1,31 +0,0 @@
1
- import { S, A, m, O, B, T, e, k, f, D, g, F, h, p, i, K, j, l, n, I, q, P } from "./index_0d526d38.js";
2
- import "./index_4b36612f.js";
3
- import "./index_86436d56.js";
4
- import "./index_015b6eba.js";
5
- import "react";
6
- import "@chakra-ui/react";
7
- import "@emotion/react";
8
- export {
9
- S as BCHToolbox,
10
- A as BTCToolbox,
11
- m as BaseUTXOToolbox,
12
- O as DOGEToolbox,
13
- B as InputSizes,
14
- T as LTCToolbox,
15
- e as OP_RETURN_OVERHEAD,
16
- k as OutputSizes,
17
- f as TX_OVERHEAD,
18
- D as UTXOScriptType,
19
- g as accumulative,
20
- F as calculateTxSize,
21
- h as compileMemo,
22
- p as getDustThreshold,
23
- i as getInputSize,
24
- K as getNetwork,
25
- j as getOutputSize,
26
- l as getScriptTypeForAddress,
27
- n as getSeed,
28
- I as standardFeeRates,
29
- q as uniqid,
30
- P as validatePhrase
31
- };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export default function AssetSelect({ onClose }: {
3
- onClose: () => void;
4
- }): JSX.Element;
@@ -1,72 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Search2Icon, ChevronUpIcon, ChevronDownIcon } from "@chakra-ui/icons";
3
- import { Avatar, Box, Button, Flex, Input, InputGroup, InputLeftElement, Stack, Text, Checkbox, } from "@chakra-ui/react";
4
- // @ts-ignore
5
- import { COIN_MAP_LONG } from "@pioneer-platform/pioneer-coins";
6
- import { useEffect, useState } from "react";
7
- import { usePioneer } from "../../context/Pioneer";
8
- // eslint-disable-next-line react/prop-types
9
- export default function AssetSelect({ onClose }) {
10
- const { state } = usePioneer();
11
- const { app, balances } = state;
12
- const [currentPage, setCurrentPage] = useState([]);
13
- const [currentPageIndex, setCurrentPageIndex] = useState(0);
14
- const [showOwnedAssets, setShowOwnedAssets] = useState(false);
15
- const [totalAssets, setTotalAssets] = useState(0);
16
- const [search, setSearch] = useState("");
17
- const [sortOrder, setSortOrder] = useState("desc");
18
- const itemsPerPage = 6;
19
- // const cardWidth = useBreakpointValue({ base: "90%", md: "60%", lg: "40%" });
20
- const handleSelectClick = async (asset) => {
21
- try {
22
- app.setAssetContext(asset);
23
- onClose();
24
- }
25
- catch (e) {
26
- console.error(e);
27
- }
28
- };
29
- const handleSearchChange = (event) => {
30
- setSearch(event.target.value);
31
- setCurrentPageIndex(0);
32
- };
33
- const toggleSortOrder = () => {
34
- setSortOrder(sortOrder === "asc" ? "desc" : "asc");
35
- };
36
- const filteredAssets = currentPage
37
- .filter((asset) => {
38
- return ((showOwnedAssets ? asset.valueUsd !== null : true) &&
39
- asset?.name?.toLowerCase().includes(search.toLowerCase()) &&
40
- (asset.valueUsd ? parseFloat(asset.valueUsd) >= 1 : false));
41
- })
42
- .sort((a, b) => {
43
- if (sortOrder === "asc") {
44
- return (a.valueUsd || 0) - (b.valueUsd || 0);
45
- }
46
- return (b.valueUsd || 0) - (a.valueUsd || 0);
47
- });
48
- useEffect(() => {
49
- setTotalAssets(filteredAssets.length);
50
- }, [showOwnedAssets, currentPage, search, sortOrder]);
51
- const fetchPage = async () => {
52
- try {
53
- if (balances) {
54
- setShowOwnedAssets(true);
55
- setCurrentPage(balances);
56
- console.log("balances: ", balances);
57
- setTotalAssets(balances.length);
58
- }
59
- }
60
- catch (e) {
61
- console.error(e);
62
- }
63
- };
64
- useEffect(() => {
65
- fetchPage();
66
- }, [balances]);
67
- return (_jsxs(Stack, { spacing: 4, children: [_jsxs(InputGroup, { children: [_jsx(InputLeftElement, { pointerEvents: "none", children: _jsx(Search2Icon, { color: "gray.300" }) }), _jsx(Input, { value: search, onChange: handleSearchChange, placeholder: "Bitcoin...", type: "text" })] }), _jsxs(Box, { children: [_jsxs(Text, { fontSize: "2xl", children: ["Total Assets: ", totalAssets] }), _jsx(Checkbox, { isChecked: showOwnedAssets, onChange: () => setShowOwnedAssets(!showOwnedAssets), children: "Show only owned assets" }), _jsxs(Button, { onClick: toggleSortOrder, size: "sm", children: ["Sort by Value", " ", sortOrder === "asc" ? _jsx(ChevronUpIcon, {}) : _jsx(ChevronDownIcon, {})] }), _jsx("br", {}), _jsx("br", {}), filteredAssets.map((asset, index) => (
68
- // eslint-disable-next-line react/no-array-index-key
69
- _jsx(Box, { children: _jsxs(Flex, { alignItems: "center", borderRadius: "md", border: "1px solid #fff", bg: "black", boxShadow: "sm", padding: 2, children: [_jsx(Avatar, { size: "md", src: `https://pioneers.dev/coins/${COIN_MAP_LONG[asset?.chain]}.png` }), _jsxs(Box, { ml: 3, children: [_jsxs(Text, { fontSize: "sm", children: ["Asset: ", asset?.symbol] }), _jsxs(Text, { fontSize: "sm", children: ["Value USD:", " ", typeof asset?.valueUsd === "string"
70
- ? (+asset.valueUsd).toFixed(2).toLocaleString()
71
- : ""] })] }), _jsx(Button, { ml: "auto", onClick: () => handleSelectClick(asset), size: "sm", variant: "outline", children: "Select" })] }) }, index)))] }), _jsxs(Flex, { justifyContent: "space-between", mt: 4, children: [_jsx(Button, { isDisabled: currentPageIndex === 0, onClick: () => setCurrentPageIndex(currentPageIndex - 1), children: "Previous Page" }), _jsx(Button, { isDisabled: filteredAssets.length < itemsPerPage, onClick: () => setCurrentPageIndex(currentPageIndex + 1), children: "Next Page" })] })] }));
72
- }
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export default function BlockchainSelect({ onClose }: {
3
- onClose: any;
4
- }): JSX.Element;