@pioneer-platform/pioneer-react 0.2.38 → 0.2.39

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "short_name": "pioneer",
3
- "name": "Pioneer Template",
3
+ "name": "bro",
4
4
  "lang": "en",
5
5
  "start_url": "/",
6
6
  "background_color": "#FFFFFF",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-react",
3
- "version": "0.2.38",
3
+ "version": "0.2.39",
4
4
  "author": "highlander",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -34,6 +34,7 @@
34
34
  "@keepkey/keepkey-sdk": "^0.2.48",
35
35
  "@pioneer-platform/pioneer-client": "^9.0.6",
36
36
  "@pioneer-sdk/sdk": "1.1.160",
37
+ "@pioneer-sdk/sdk-v2": "0.0.3",
37
38
  "@shapeshiftoss/hdwallet-core": "^1.50.0",
38
39
  "@shapeshiftoss/hdwallet-metamask": "^1.50.0",
39
40
  "@shapeshiftoss/hdwallet-native": "^1.50.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "short_name": "pioneer",
3
- "name": "Pioneer Template",
3
+ "name": "bro",
4
4
  "lang": "en",
5
5
  "start_url": "/",
6
6
  "background_color": "#FFFFFF",
@@ -142,7 +142,7 @@ const Pioneer = () => {
142
142
  let isOnboarded = await localStorage.getItem("isOnboarded")
143
143
  if(!isOnboarded){
144
144
  console.log("Starting onboarding process")
145
- onOpen();
145
+ //onOpen();
146
146
  }
147
147
  }catch(e){
148
148
  console.error(e)
@@ -42,6 +42,9 @@ import * as core from "@shapeshiftoss/hdwallet-core";
42
42
  import {
43
43
  enableShapeShiftSnap,
44
44
  shapeShiftSnapInstalled,
45
+ BTCGetAddress as snapBitcoinGetAddress,
46
+ BTCGetPublicKeys as snapBitcoinGetPublicKeys,
47
+ BTCSignTransaction as snapBitcoinSignTransaction,
45
48
  } from "@shapeshiftoss/metamask-snaps-adapter";
46
49
  // import * as keplr from "@shapeshiftoss/hdwallet-keplr";
47
50
  // import * as metaMask from "@shapeshiftoss/hdwallet-metamask";
@@ -362,6 +365,41 @@ export const PioneerProvider = ({
362
365
  dispatch({ type: WalletActions.ADD_WALLET, payload: walletMetaMask });
363
366
 
364
367
  appInit.pairWallet(walletMetaMask);
368
+ console.log("walletMetaMask: ", walletMetaMask);
369
+ //get btc address
370
+ // let accountInfo = await walletMetaMask.getAccountInfo("bitcoin");
371
+ // console.log("accountInfo: ", accountInfo);
372
+
373
+ //get pubkeys
374
+ // let pubkeys = await walletMetaMask.getPublicKeys([
375
+ // {
376
+ // addressNList: [0x80000000 + 44, 0x80000000 + 0, 0x80000000 + 0],
377
+ // curve: "secp256k1",
378
+ // showDisplay: true, // Not supported by TrezorConnect or Ledger, but KeepKey should do it
379
+ // coin: "Bitcoin",
380
+ // }])
381
+ // console.log(pubkeys)
382
+
383
+ let address = await walletMetaMask.binanceGetAddress({
384
+ addressNList: [ 2147483692, 2147483648, 2147483648, 0, 4 ]
385
+ })
386
+
387
+ // let address = await walletMetaMask.btcGetAddress({
388
+ // addressNList: [ 2147483692, 2147483648, 2147483648, 0, 4 ],
389
+ // coin: 'Bitcoin',
390
+ // scriptType: 'p2pkh',
391
+ // showDisplay: false
392
+ // })
393
+
394
+ // let address = await walletMetaMask.btcGetAddress({
395
+ // addressNList: [ 2147483692, 2147483793, 2147483648, 0, 3 ],
396
+ // coin: 'BitcoinCash',
397
+ // scriptType: 'p2pkh',
398
+ // showDisplay: false
399
+ // })
400
+ console.log("METAMASK BTC ADDRESS: ", address);
401
+
402
+
365
403
  // console.log("successMetaMask: ", successMetaMask);
366
404
  // if (successMetaMask) {
367
405
  // // @ts-ignore
@@ -23,7 +23,6 @@ const Home = () => {
23
23
  const [modalType, setModalType] = useState("");
24
24
  const { isOpen, onOpen, onClose } = useDisclosure();
25
25
 
26
-
27
26
  useEffect(() => {
28
27
  console.log("2 pubkeyContext: ", pubkeyContext);
29
28
  setAddress(pubkeyContext.master || pubkeyContext.pubkey || pubkeyContext);
@@ -1,36 +0,0 @@
1
- import { Box, Button, Flex, Image, Link } from "@chakra-ui/react";
2
- import { AiFillGithub } from "react-icons/ai";
3
-
4
- const CTASection = () => (
5
- <Box textAlign="center">
6
- <Link
7
- _hover={undefined}
8
- href="https://github.com/BitHighlander/pioneer-template"
9
- >
10
- <Button leftIcon={<AiFillGithub />} size="sm">
11
- Open in Github
12
- </Button>
13
- </Link>
14
- <Flex marginY={4} justifyContent="center" gridGap={2}>
15
- <Link
16
- aria-label="Deploy to Vercel"
17
- isExternal
18
- href="https://vercel.com/import/git?s=https://github.com/BitHighlander/pioneer-template"
19
- >
20
- <Image src="https://vercel.com/button" alt="Vercel deploy button" />
21
- </Link>
22
- <Link
23
- aria-label="Deploy to Netlify"
24
- isExternal
25
- href="https://app.netlify.com/start/deploy?repository=https://github.com/BitHighlander/pioneer-template"
26
- >
27
- <Image
28
- src="https://www.netlify.com/img/deploy/button.svg"
29
- alt="Netlify deploy button"
30
- />
31
- </Link>
32
- </Flex>
33
- </Box>
34
- );
35
-
36
- export default CTASection;
@@ -1,36 +0,0 @@
1
- import { Flex, Image } from "@chakra-ui/react";
2
-
3
- const ICON_SIZE = 22;
4
-
5
- const SomeImage = () => {
6
- return (
7
- <Flex marginY={4} justifyContent="center" alignItems="center" gridGap={2}>
8
- <Image
9
- src="/assets/vite-logo.svg"
10
- title="vite"
11
- height={ICON_SIZE}
12
- width={ICON_SIZE}
13
- />
14
- <Image
15
- src="/assets/react-icon.svg"
16
- title="react"
17
- height={ICON_SIZE}
18
- width={ICON_SIZE}
19
- />
20
- <Image
21
- src="/assets/chakra-ui-logomark-colored.svg"
22
- title="Chakra UI"
23
- height={ICON_SIZE}
24
- width={ICON_SIZE}
25
- />
26
- <Image
27
- src="/assets/ts-logo-512.svg"
28
- title="TypeScript"
29
- height={ICON_SIZE}
30
- width={ICON_SIZE}
31
- />
32
- </Flex>
33
- );
34
- };
35
-
36
- export default SomeImage;
@@ -1,16 +0,0 @@
1
- import { Grid, Heading, Text } from "@chakra-ui/react";
2
-
3
- const SomeText = () => {
4
- return (
5
- <Grid textAlign="center" gap={2}>
6
- <Heading fontSize="2xl" fontWeight="extrabold">
7
- Pioneer Template
8
- </Heading>
9
- <Text color="gray.500" fontSize="sm">
10
- The Most Powerful Template for Building on Crypto
11
- </Text>
12
- </Grid>
13
- );
14
- };
15
-
16
- export default SomeText;