Commit cc381104 authored by tom's avatar tom

fix tests

parent 92731b44
...@@ -9,6 +9,7 @@ jobs: ...@@ -9,6 +9,7 @@ jobs:
jest_tests: jest_tests:
name: Run tests with Jest name: Run tests with Jest
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ false }} # disable since there are no jest test yet
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
......
...@@ -5,5 +5,5 @@ import appConfig from 'configs/app/config'; ...@@ -5,5 +5,5 @@ import appConfig from 'configs/app/config';
export default function useLoginUrl() { export default function useLoginUrl() {
const router = useRouter(); const router = useRouter();
return appConfig.authUrl + route({ pathname: '/auth', query: { path: router.asPath } }); return appConfig.authUrl + route({ pathname: '/auth/auth0', query: { path: router.asPath } });
} }
...@@ -22,7 +22,7 @@ export function middleware(req: NextRequest) { ...@@ -22,7 +22,7 @@ export function middleware(req: NextRequest) {
const apiToken = req.cookies.get(NAMES.API_TOKEN); const apiToken = req.cookies.get(NAMES.API_TOKEN);
if ((isAccountRoute || isProfileRoute) && !apiToken && appConfig.isAccountSupported) { if ((isAccountRoute || isProfileRoute) && !apiToken && appConfig.isAccountSupported) {
const authUrl = appConfig.authUrl + route({ pathname: '/auth', query: { path: req.nextUrl.pathname } }); const authUrl = appConfig.authUrl + route({ pathname: '/auth/auth0', query: { path: req.nextUrl.pathname } });
return NextResponse.redirect(authUrl); return NextResponse.redirect(authUrl);
} }
......
import type { NextPage } from 'next'; import type { NextPage } from 'next';
const AuthPage: NextPage = () => { const Auth0Page: NextPage = () => {
return null; return null;
}; };
export default AuthPage; export default Auth0Page;
export async function getServerSideProps() { export async function getServerSideProps() {
return { return {
......
...@@ -83,7 +83,7 @@ export interface AddressTokenTransferResponse { ...@@ -83,7 +83,7 @@ export interface AddressTokenTransferResponse {
export type AddressTokenTransferFilters = { export type AddressTokenTransferFilters = {
filter?: AddressFromToFilter; filter?: AddressFromToFilter;
type?: Array<TokenType>; type?: Array<TokenType>;
token?: string; token_hash?: string;
} }
export type AddressTokensFilter = { export type AddressTokensFilter = {
......
...@@ -18,7 +18,7 @@ declare module "nextjs-routes" { ...@@ -18,7 +18,7 @@ declare module "nextjs-routes" {
| StaticRoute<"/api/proxy"> | StaticRoute<"/api/proxy">
| DynamicRoute<"/apps/[id]", { "id": string }> | DynamicRoute<"/apps/[id]", { "id": string }>
| StaticRoute<"/apps"> | StaticRoute<"/apps">
| StaticRoute<"/auth"> | StaticRoute<"/auth/auth0">
| StaticRoute<"/auth/profile"> | StaticRoute<"/auth/profile">
| DynamicRoute<"/block/[height]", { "height": string }> | DynamicRoute<"/block/[height]", { "height": string }>
| StaticRoute<"/blocks"> | StaticRoute<"/blocks">
......
...@@ -87,7 +87,7 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD ...@@ -87,7 +87,7 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
const { isError, isLoading, data, pagination, onFilterChange, isPaginationVisible } = useQueryWithPages({ const { isError, isLoading, data, pagination, onFilterChange, isPaginationVisible } = useQueryWithPages({
resourceName: 'address_token_transfers', resourceName: 'address_token_transfers',
pathParams: { hash: currentAddress }, pathParams: { hash: currentAddress },
filters: tokenFilter ? { token: tokenFilter } : filters, filters: tokenFilter ? { token_hash: tokenFilter } : filters,
scrollRef, scrollRef,
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment