Skip to content

Commit

Permalink
Fix personal txs display
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Jul 3, 2024
1 parent e92de20 commit 1050bd7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions integration/networktest/env/network_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func DevTestnet(opts ...TestnetEnvOption) networktest.Environment {
// LongRunningLocalNetwork is a local network, the l1WSURL is optional (can be empty string), only required if testing L1 interactions
func LongRunningLocalNetwork(l1WSURL string) networktest.Environment {
connector := newTestnetConnectorWithFaucetAccount(
"ws://127.0.0.1:26900",
[]string{"ws://127.0.0.1:26901"},
"ws://127.0.0.1:17900",
[]string{"ws://127.0.0.1:17901"},
genesis.TestnetPrefundedPK,
l1WSURL,
"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const (
_sepoliaValidator1PK = "<pk>" // account 0x<acc>
)

// Spins up a local network with a gateway, with all processes debuggable. The network will run until the test is stopped.
// Note: If you want to access the gateway frontend you need to `npm run build` its frontend with NEXT_PUBLIC_API_GATEWAY_URL=http://localhost:11180
func TestRunLocalNetwork(t *testing.T) {
networktest.TestOnlyRunsInIDE(t)
networktest.EnsureTestLogsSetUp("local-geth-network")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ export const useTransactionsService = () => {
...options,
},
};
const personalTxData = await provider.send(ethMethods.getStorageAt, [
const personalTxResp = await provider.send(ethMethods.getStorageAt, [
tenCustomQueryMethods.listPersonalTransactions,
JSON.stringify(requestPayload),
null,
]);
const personalTxData = jsonHexToObj(personalTxResp);
setPersonalTxns(personalTxData);
}
} catch (error) {
Expand Down Expand Up @@ -96,3 +97,7 @@ export const useTransactionsService = () => {
price,
};
};

function jsonHexToObj(hex: string) {
return JSON.parse(Buffer.from(hex.slice(2), "hex").toString());
}

0 comments on commit 1050bd7

Please sign in to comment.