-
- Result
-
{isLoading ? (
"Publishing...."
) : (
@@ -210,10 +205,12 @@ export const BuildTestPublish = () => {
{isError &&
}
{!isError && (
<>
-
Transaction: {currentDigest}
-
-
Effects:
- {/*
Package id: {packageId} */}
+ {currentDigest && <>
+
+ Result
+
+
Transaction: {currentDigest}
+ >}
{uniquePackages.map((pkg) => {
diff --git a/webview-ui/src/features/buildTestPublish/v1/index.tsx b/webview-ui/src/features/buildTestPublish/v1/index.tsx
deleted file mode 100644
index 34135e0..0000000
--- a/webview-ui/src/features/buildTestPublish/v1/index.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-{/*
Build
- setBuildPath(e.target.value)} />
-
- Publish
- setPublishPath(e.target.value)} />
- */}
\ No newline at end of file
diff --git a/webview-ui/src/features/gasAddress/gas.tsx b/webview-ui/src/features/gasAddress/gas.tsx
index 931ad71..4db2e7f 100644
--- a/webview-ui/src/features/gasAddress/gas.tsx
+++ b/webview-ui/src/features/gasAddress/gas.tsx
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";
import { requestDataFromTerminal } from "../../utils/wv_communicate_ext";
import { SuiCommand } from "../../../../src/enums";
-import { useSuiClientContext } from "@mysten/dapp-kit";
+import { useSuiClient, useSuiClientContext } from "@mysten/dapp-kit";
import { useMySuiAccount } from "../../context/MySuiAccountProvider";
import { shortenAddress } from "../../utils/address_shortener";
@@ -13,12 +13,34 @@ export interface GasObject {
export const Gas = () => {
// remember that then change UI in here need to call to terminal
const { network } = useSuiClientContext();
+ const suiClient = useSuiClient();
const { currentAddress, currentGasObject, gasObjects, setCurrentGasObject, setGasObjects } =
useMySuiAccount();
const [isLoading, setIsLoading] = useState(false);
+ const [reload, setReload] = useState(1);
- const requestFaucet = () => {};
+ const requestFaucet = async () => {
+ const resp = await requestDataFromTerminal({
+ cmd: SuiCommand.REQUEST_FAUCET,
+ });
+ const { stdout, stderr } = resp;
+ setIsLoading(true);
+ setTimeout(() => {
+ setReload(Math.random())
+ setIsLoading(false);
+ }, 10000)
+ };
+
+ // useEffect(() => {
+ // async function getGasObjects() {
+ // const resp = await suiClient.getAllCoins({ owner: currentAddress })
+ // console.log(resp);
+ // }
+ // if (currentAddress) {
+ // getGasObjects();
+ // }
+ // }, [currentAddress])
useEffect(() => {
async function getGasObjects() {
@@ -33,7 +55,7 @@ export const Gas = () => {
// console.log(objects);
}
getGasObjects();
- }, [network, currentAddress]);
+ }, [network, currentAddress, reload]);
const balanceOfCurrentGasObject = gasObjects.find(
(gasObject) => gasObject.gasCoinId === currentGasObject
@@ -95,7 +117,7 @@ export const Gas = () => {