kopia lustrzana https://github.com/bugout-dev/moonstream
fix of route
rodzic
ad8d4767dc
commit
e519cabad9
|
@ -42,3 +42,4 @@ async def version_handler() -> data.VersionResponse:
|
|||
app.mount("/subscriptions", subscriptions_api)
|
||||
app.mount("/users", users_api)
|
||||
app.mount("/streams", streams_api)
|
||||
app.mount("/txinfo", txinfo_api)
|
|
@ -11,7 +11,7 @@ fastapi==0.66.0
|
|||
h11==0.12.0
|
||||
idna==3.2
|
||||
jmespath==0.10.0
|
||||
-e git+https://git@github.com/bugout-dev/moonstream.git@3326379b174a626cf876c7b60dd7db8afe2daba9#egg=moonstreamdb&subdirectory=db
|
||||
-e git+https://git@github.com/bugout-dev/moonstream.git@5946abb75bb91f27dbcf93dc15be205700dc7a51#egg=moonstreamdb&subdirectory=db
|
||||
mypy==0.910
|
||||
mypy-extensions==0.4.3
|
||||
pathspec==0.9.0
|
||||
|
|
|
@ -42,7 +42,12 @@ const raw_transaction = {
|
|||
"value": 0
|
||||
}
|
||||
}
|
||||
const test = useTxInfo(raw_transaction)
|
||||
async function test() {
|
||||
const testt = await useTxInfo(raw_transaction)
|
||||
console.log(testt)
|
||||
|
||||
}
|
||||
test()
|
||||
console.log(test)
|
||||
let isFetchedAfterMount = false;
|
||||
let isLoading = false;
|
||||
|
|
|
@ -13,7 +13,7 @@ const StreamEntry = ({ entry, filterCallback, filterConstants }) => {
|
|||
ui.setEntryId(entryId);
|
||||
ui.setEntriesViewMode("entry");
|
||||
router.push({
|
||||
pathname: `/stream/${entry.id}`,
|
||||
pathname: `/stream/${entry.hash}`,
|
||||
query: router.query,
|
||||
});
|
||||
};
|
||||
|
@ -92,7 +92,7 @@ const StreamEntry = ({ entry, filterCallback, filterConstants }) => {
|
|||
boxSize="32px"
|
||||
colorScheme="primary"
|
||||
icon={<ViewIcon />}
|
||||
onClick={() => handleViewClicked(entry.id)}
|
||||
onClick={() => handleViewClicked(entry)}
|
||||
/>
|
||||
</Flex>
|
||||
);
|
||||
|
|
|
@ -4,13 +4,14 @@ import { queryCacheProps } from "./hookCommon";
|
|||
import { useToast } from ".";
|
||||
|
||||
const useTxInfo = (transaction) => {
|
||||
console.log("Use hook", transaction)
|
||||
const toast = useToast();
|
||||
const getTxInfo = async () => {
|
||||
const data = await TxInfoService.getTxInfo(transaction);
|
||||
return data;
|
||||
const response = await TxInfoService.getTxInfo(transaction);
|
||||
return response.data;
|
||||
}
|
||||
const { data, isLoading, isFetchedAfterMount, refetch, isError, error } =
|
||||
useQuery(["txinfo", {transaction}], getTxInfo, {
|
||||
useQuery(["txinfo", transaction.tx.hash ], getTxInfo, {
|
||||
...queryCacheProps,
|
||||
onError: (error) => toast(error, "error"),
|
||||
});
|
||||
|
|
|
@ -2,10 +2,9 @@ import { http } from "../utils";
|
|||
|
||||
const API = process.env.NEXT_PUBLIC_MOONSTREAM_API_URL;
|
||||
|
||||
export const getTxInfo = (tx) => {
|
||||
export const getTxInfo = (tx) =>
|
||||
http({
|
||||
method: "POST",
|
||||
url: `${API}/txinfo/ethereum_blockchain`,
|
||||
tx
|
||||
})
|
||||
}
|
||||
data: tx
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue