Skip to content

Commit

Permalink
Fix vite issue with graz package deep imports (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbarry authored Jan 30, 2024
1 parent 9424f6e commit 105279a
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 26 deletions.
6 changes: 6 additions & 0 deletions .changeset/two-impalas-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"abstraxion-dashboard": minor
"@burnt-labs/abstraxion": minor
---

Fix vite issue with graz package deep imports
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useContext, useEffect, useState } from "react";
import { GasPrice } from "graz/dist/cosmjs";
import { useStytch } from "@stytch/nextjs";
import { useCosmWasmSigningClient } from "graz";
import { AAClient, AbstractAccountJWTSigner } from "@burnt-labs/signers";
Expand All @@ -8,6 +7,7 @@ import {
AbstraxionContext,
AbstraxionContextProps,
} from "@/components/AbstraxionContext";
import { GasPrice } from "@cosmjs/stargate";

export const useAbstraxionSigningClient = () => {
const { connectionType, abstractAccount } = useContext(
Expand Down
1 change: 1 addition & 0 deletions apps/abstraxion-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@burnt-labs/tailwind-config": "workspace:*",
"@burnt-labs/ui": "workspace:*",
"@cosmjs/proto-signing": "^0.31.3",
"@cosmjs/stargate": "^0.31.3",
"@stytch/nextjs": "^14.0.0",
"@stytch/vanilla-js": "^3.2.1",
"@tanstack/react-query": "^4.36.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReactNode, createContext, useState } from "react";
import type { DirectSecp256k1HdWallet } from "graz/dist/cosmjs";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";

export interface AbstraxionContextProps {
isConnected: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";
import { useContext, useEffect, useRef, useState } from "react";
import { DirectSecp256k1HdWallet } from "graz/dist/cosmjs";
import { Button, ModalSection, BrowserIcon } from "@burnt-labs/ui";
import { wait } from "@/utils/wait";
import { AbstraxionContext } from "../AbstraxionContext";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";

type GrantsResponse = {
grants: Grant[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useContext, useEffect, useState } from "react";
import { GasPrice } from "graz/dist/cosmjs";
import { testnetChainInfo } from "@burnt-labs/constants";
import {
AbstraxionContext,
AbstraxionContextProps,
} from "@/src/components/AbstraxionContext";
import { GranteeSignerClient } from "@/src/GranteeSignerClient.ts";
import { GasPrice } from "@cosmjs/stargate";

export const useAbstraxionSigningClient = () => {
const { isConnected, abstraxionAccount, granterAddress } = useContext(
Expand Down
2 changes: 1 addition & 1 deletion packages/abstraxion/utils/get-account-address.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DirectSecp256k1HdWallet } from "graz/dist/cosmjs";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";

export async function getAccountAddress() {
const existingKeypair = localStorage.getItem("xion-authz-temp-account");
Expand Down
45 changes: 24 additions & 21 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 105279a

Please sign in to comment.