-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from 4chain-AG/runtime-vars
feat(BUX-112): runtime variables for bux-wallet frontend
- Loading branch information
Showing
33 changed files
with
371 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/dev-dist | ||
**/node_modules/ | ||
**/dist | ||
.git | ||
npm-debug.log |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,6 @@ dist-ssr | |
# docker compose | ||
data/ | ||
bux-wallet-backend.env.private | ||
|
||
# overriden config | ||
env-config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"apiUrl": "http://localhost:3002", | ||
"paymailDomain": "4chain.space" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { useConfig } from '@/providers' | ||
|
||
export const useApiUrl = () => { | ||
const { config } = useConfig() | ||
return config.apiUrl ? `${config.apiUrl}/api/v1` : undefined | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { axiosClient } from '@/api/client' | ||
import axios from 'axios' | ||
|
||
export const getTransactionsDetails = async (transactionId: string) => { | ||
const { data: response } = await axiosClient.get(`/transaction/${transactionId}`) | ||
export const getTransactionsDetails = async (apiUrl: string, transactionId: string) => { | ||
const { data: response } = await axios.get(`${apiUrl}/transaction/${transactionId}`) | ||
return response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { axiosClient } from '@/api/client' | ||
import axios from 'axios' | ||
|
||
export const getUser = async () => { | ||
const { data: response } = await axiosClient.get('/user') | ||
export const getUser = async (apiUrl: string) => { | ||
const { data: response } = await axios.get(`${apiUrl}/user`) | ||
return response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { User } from '@/api/types/user' | ||
import { axiosClient } from '@/api/client' | ||
import axios from 'axios' | ||
|
||
export const loginUser = async (data: User) => { | ||
const { data: response } = await axiosClient.post('/sign-in', data, { withCredentials: true }) | ||
export const loginUser = async (apiUrl: string, data: User) => { | ||
const { data: response } = await axios.post(`${apiUrl}/sign-in`, data, { withCredentials: true }) | ||
return response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { axiosClient } from '@/api/client' | ||
import axios from 'axios' | ||
|
||
export const logoutUser = async () => { | ||
await axiosClient.post('/sign-out') | ||
export const logoutUser = async (apiUrl: string) => { | ||
await axios.post(`${apiUrl}/sign-out`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { RegisterNewUserDto } from '@/api/types/user' | ||
import { axiosClient } from '@/api/client' | ||
import axios from 'axios' | ||
|
||
export const registerUser = async (data: RegisterNewUserDto) => { | ||
const { data: response } = await axiosClient.post('/user', data) | ||
export const registerUser = async (apiUrl: string, data: RegisterNewUserDto) => { | ||
const { data: response } = await axios.post(`${apiUrl}/user`, data) | ||
return response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { axiosClient } from '@/api/client' | ||
import { SendNewTransaction } from '@/api/types/transaction' | ||
import axios from 'axios' | ||
|
||
export const sendTransaction = async (data: SendNewTransaction) => { | ||
const { data: response } = await axiosClient.post('/transaction', data) | ||
export const sendTransaction = async (apiUrl: string, data: SendNewTransaction) => { | ||
const { data: response } = await axios.post(`${apiUrl}/transaction`, data) | ||
return response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.