mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 06:08:10 +00:00
multiple changes
WW-26 - render and update methods are now arrow functions WW-18 - created history page for listing transactions WW-12 - list wallets on menu
This commit is contained in:
@@ -19,6 +19,11 @@ class AppLinkElement extends HTMLElement {
|
|||||||
|
|
||||||
public connectedCallback(): void {
|
public connectedCallback(): void {
|
||||||
this.routerService = this.appMain?.routerService;
|
this.routerService = this.appMain?.routerService;
|
||||||
|
if (!this.title && this.innerText) {
|
||||||
|
const _slottedText = this.innerText;
|
||||||
|
this.innerText = null;
|
||||||
|
this.title = _slottedText;
|
||||||
|
}
|
||||||
this.update();
|
this.update();
|
||||||
if (isTrue(this.goBack)) {
|
if (isTrue(this.goBack)) {
|
||||||
window.addEventListener("routechanged", this.update);
|
window.addEventListener("routechanged", this.update);
|
||||||
@@ -44,7 +49,7 @@ class AppLinkElement extends HTMLElement {
|
|||||||
return isTrue(this.goBack) && this.routerService.emptyState;
|
return isTrue(this.goBack) && this.routerService.emptyState;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render = () => {
|
||||||
return html`${this.disabled
|
return html`${this.disabled
|
||||||
? html`<span data-target="app-link.main" style="color:grey"
|
? html`<span data-target="app-link.main" style="color:grey"
|
||||||
>${this.title}</span
|
>${this.title}</span
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ class AppMainElement extends HTMLElement {
|
|||||||
layout: "menu-layout",
|
layout: "menu-layout",
|
||||||
middleware: this.middleAuth,
|
middleware: this.middleAuth,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/history",
|
||||||
|
component: "history-page",
|
||||||
|
layout: "menu-layout",
|
||||||
|
middleware: this.middleAuth,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/register",
|
path: "/register",
|
||||||
component: "register-page",
|
component: "register-page",
|
||||||
|
|||||||
107
src/components/app-menu/AppMenuElement.ts
Normal file
107
src/components/app-menu/AppMenuElement.ts
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
import { controller, target } from "@github/catalyst";
|
||||||
|
import { html, render } from "@github/jtml";
|
||||||
|
import { AppMainElement } from "components/app-main/AppMainElement";
|
||||||
|
import { closest, update } from "core/utils";
|
||||||
|
import { WalletService } from "services/";
|
||||||
|
|
||||||
|
@controller
|
||||||
|
class AppMenuElement extends HTMLElement {
|
||||||
|
private walletService: WalletService;
|
||||||
|
private walletData: Array<any>;
|
||||||
|
private totalWallets: number;
|
||||||
|
@closest appMain: AppMainElement;
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
connectedCallback() {
|
||||||
|
this.walletService = new WalletService(this.appMain?.appService);
|
||||||
|
this.update();
|
||||||
|
if (this.appMain.isAuth) this.getWallets();
|
||||||
|
window.addEventListener("tokenchange", this.updateToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
disconnectedCallback(): void {
|
||||||
|
window.removeEventListener("tokenchange", this.updateToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
getWallets = async () => {
|
||||||
|
try {
|
||||||
|
const response = await this.walletService.getAll({ rpp: 2 });
|
||||||
|
this.setWallets(response.items, response.totalRecords);
|
||||||
|
} catch (err) {
|
||||||
|
this.update();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
setWallets(wallets: Array<any>, totalWallets: number) {
|
||||||
|
this.walletData = wallets;
|
||||||
|
this.totalWallets = totalWallets;
|
||||||
|
console.log("eh");
|
||||||
|
this.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
updateToken = () => {
|
||||||
|
if (this.isAuth) {
|
||||||
|
this.getWallets();
|
||||||
|
} else {
|
||||||
|
this.update();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
update = () => {
|
||||||
|
render(this.render(), this);
|
||||||
|
};
|
||||||
|
|
||||||
|
get isAuth() {
|
||||||
|
return this.appMain.isAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
render = () => {
|
||||||
|
return html`
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<app-link data-to="/">Home</app-link>
|
||||||
|
</li>
|
||||||
|
${this.isAuth
|
||||||
|
? html` <li>
|
||||||
|
<app-link data-to="/history">History</app-link>
|
||||||
|
</li>`
|
||||||
|
: null}
|
||||||
|
${this.isAuth && this.totalWallets > 0
|
||||||
|
? this.walletData.map((wallet) => {
|
||||||
|
return html`
|
||||||
|
<li>
|
||||||
|
<app-link data-to="/wallet/${wallet.id}"
|
||||||
|
>${wallet.name}</app-link
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
`;
|
||||||
|
})
|
||||||
|
: null}
|
||||||
|
${this.isAuth && this.totalWallets > 2
|
||||||
|
? html`
|
||||||
|
<li>
|
||||||
|
<app-link data-to="/wallet/all">Other</app-link>
|
||||||
|
</li>
|
||||||
|
`
|
||||||
|
: null}
|
||||||
|
${this.isAuth
|
||||||
|
? html` <li>
|
||||||
|
<app-link data-to="/logout">Logout</app-link>
|
||||||
|
</li>`
|
||||||
|
: null}
|
||||||
|
${!this.isAuth
|
||||||
|
? html`
|
||||||
|
<li>
|
||||||
|
<app-link data-to="/login">Login</app-link>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<app-link data-to="/register">Register</app-link>
|
||||||
|
</li>
|
||||||
|
`
|
||||||
|
: null}
|
||||||
|
</ul>
|
||||||
|
`;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,16 +11,16 @@ class AppShadowElement extends HTMLElement {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@update
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
this.attachShadow({ mode: "open" });
|
this.attachShadow({ mode: "open" });
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render = () => {
|
||||||
return html` <app-main></app-main> `;
|
return html` <app-main></app-main> `;
|
||||||
}
|
};
|
||||||
|
|
||||||
update() {
|
update = () => {
|
||||||
render(this.render(), this.shadowRoot!);
|
render(this.render(), this.shadowRoot!);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ export * from "./app-link/AppLinkElement";
|
|||||||
export * from "./app-modal/AppModalElement";
|
export * from "./app-modal/AppModalElement";
|
||||||
export * from "./app-root/AppRootElement";
|
export * from "./app-root/AppRootElement";
|
||||||
export * from "./app-slot/AppSlotElement";
|
export * from "./app-slot/AppSlotElement";
|
||||||
|
export * from "./app-menu/AppMenuElement";
|
||||||
export * from "./input-field/InputFieldElement";
|
export * from "./input-field/InputFieldElement";
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ class InputFieldElement extends HTMLElement {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@update
|
|
||||||
public connectedCallback(): void {
|
public connectedCallback(): void {
|
||||||
this.randId = `${name}${randomId()}`;
|
this.randId = `${name}${randomId()}`;
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
get valid(): boolean {
|
get valid(): boolean {
|
||||||
@@ -37,7 +37,6 @@ class InputFieldElement extends HTMLElement {
|
|||||||
return this.rules.includes("required");
|
return this.rules.includes("required");
|
||||||
}
|
}
|
||||||
|
|
||||||
@update
|
|
||||||
validate(): boolean {
|
validate(): boolean {
|
||||||
let _return = true;
|
let _return = true;
|
||||||
const rules = this.rules?.split("|").filter((a) => a);
|
const rules = this.rules?.split("|").filter((a) => a);
|
||||||
@@ -66,22 +65,24 @@ class InputFieldElement extends HTMLElement {
|
|||||||
if (_return) {
|
if (_return) {
|
||||||
this.error = null;
|
this.error = null;
|
||||||
}
|
}
|
||||||
|
this.update();
|
||||||
return _return;
|
return _return;
|
||||||
}
|
}
|
||||||
|
|
||||||
update() {
|
render = () => {
|
||||||
render(
|
return html`<div data-target="input-field.main">
|
||||||
html`<div data-target="input-field.main">
|
${this.label &&
|
||||||
${this.label &&
|
html`<label for="${this.randId}"
|
||||||
html`<label for="${this.randId}"
|
>${this.label}${this.required ? " (*)" : ""}</label
|
||||||
>${this.label}${this.required ? " (*)" : ""}</label
|
>`}
|
||||||
>`}
|
<input type="${this.type}" data-target="input-field.inp" />
|
||||||
<input type="${this.type}" data-target="input-field.inp" />
|
${this.error && html`<span>${this.error}</span>`}
|
||||||
${this.error && html`<span>${this.error}</span>`}
|
</div>`;
|
||||||
</div>`,
|
};
|
||||||
this
|
|
||||||
);
|
update = () => {
|
||||||
}
|
render(this.render(), this);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { InputFieldElement };
|
export type { InputFieldElement };
|
||||||
|
|||||||
@@ -120,8 +120,8 @@ class AppService {
|
|||||||
response?.statusCode == 401
|
response?.statusCode == 401
|
||||||
) {
|
) {
|
||||||
if (response?.statusCode == 401) {
|
if (response?.statusCode == 401) {
|
||||||
this.appMain.authStore.token = null;
|
|
||||||
this.appMain.routerService.goTo("/token-expired");
|
this.appMain.routerService.goTo("/token-expired");
|
||||||
|
this.appMain.authStore.token = null;
|
||||||
}
|
}
|
||||||
throw response;
|
throw response;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { AppService, HttpClient } from "core/services";
|
|||||||
class BaseService {
|
class BaseService {
|
||||||
constructor(public endpoint: string, public appService: AppService) {}
|
constructor(public endpoint: string, public appService: AppService) {}
|
||||||
|
|
||||||
getAll = (headers?: HeadersInit) => {
|
getAll = (params?: Object, headers?: HeadersInit) => {
|
||||||
return this.appService.get(this.endpoint, null, headers);
|
return this.appService.get(this.endpoint, params, headers);
|
||||||
};
|
};
|
||||||
|
|
||||||
get = (params?: Object, headers?: HeadersInit) => {
|
get = (params?: Object, headers?: HeadersInit) => {
|
||||||
|
|||||||
@@ -136,7 +136,6 @@ class RouterService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@update
|
|
||||||
goBack() {
|
goBack() {
|
||||||
if (!Array.isArray(this.historyStack)) this.historyStack = [];
|
if (!Array.isArray(this.historyStack)) this.historyStack = [];
|
||||||
const lenHistory = this.historyStack.length;
|
const lenHistory = this.historyStack.length;
|
||||||
@@ -147,14 +146,15 @@ class RouterService {
|
|||||||
window.history.pushState({}, "", url.toString());
|
window.history.pushState({}, "", url.toString());
|
||||||
this.historyStack.pop();
|
this.historyStack.pop();
|
||||||
}
|
}
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@update
|
|
||||||
init() {
|
init() {
|
||||||
window.addEventListener("popstate", () => {
|
window.addEventListener("popstate", () => {
|
||||||
this.historyStack.pop();
|
this.historyStack.pop();
|
||||||
this.update();
|
this.update();
|
||||||
});
|
});
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
findByPath() {
|
findByPath() {
|
||||||
|
|||||||
@@ -24,28 +24,21 @@ class MenuLayoutElement extends BaseLayoutElement {
|
|||||||
get isAuth() {
|
get isAuth() {
|
||||||
const _hasToken = this.appMain?.isAuth;
|
const _hasToken = this.appMain?.isAuth;
|
||||||
const _hasData = this.appMain?.authStore?.user;
|
const _hasData = this.appMain?.authStore?.user;
|
||||||
return _hasData && _hasToken;
|
return _hasToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateAuth = () => {
|
updateAuth = () => {
|
||||||
this.update();
|
this.update();
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render = () => {
|
||||||
return html`
|
return html`
|
||||||
${this.isAuth &&
|
<app-menu></app-menu>
|
||||||
html`<div>
|
|
||||||
<app-link data-go-back="true" data-title="Go back"></app-link>
|
|
||||||
</div>`}
|
|
||||||
<app-slot data-target="menu-layout.appSlot"></app-slot>
|
<app-slot data-target="menu-layout.appSlot"></app-slot>
|
||||||
`;
|
`;
|
||||||
}
|
};
|
||||||
|
|
||||||
update = () => {
|
update = () => {
|
||||||
render(this.render(), this);
|
render(this.render(), this);
|
||||||
const _appSlot = this._appSlot;
|
|
||||||
if (_appSlot && this.appSlot) {
|
|
||||||
this.appSlot.innerHTML = _appSlot;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
69
src/pages/history-page/HistoryPageElement.ts
Normal file
69
src/pages/history-page/HistoryPageElement.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import { attr, targets, controller, target } from "@github/catalyst";
|
||||||
|
import { closest, index, update, isTrue } from "core/utils";
|
||||||
|
import { html, render, until } from "@github/jtml";
|
||||||
|
import { TransactionsService } from "services/";
|
||||||
|
import { AppMainElement } from "components/";
|
||||||
|
|
||||||
|
@controller
|
||||||
|
class HistoryPageElement extends HTMLElement {
|
||||||
|
private transactionsService: TransactionsService;
|
||||||
|
private transactions: Array<any> = [];
|
||||||
|
@closest appMain: AppMainElement;
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
connectedCallback() {
|
||||||
|
this.transactionsService = new TransactionsService(
|
||||||
|
this.appMain?.appService
|
||||||
|
);
|
||||||
|
if (this.appMain.isAuth) this.getTransactions();
|
||||||
|
this.update();
|
||||||
|
window.addEventListener("tokenchange", this.update);
|
||||||
|
}
|
||||||
|
|
||||||
|
disconnectedCallback(): void {
|
||||||
|
window.removeEventListener("tokenchange", this.update);
|
||||||
|
}
|
||||||
|
|
||||||
|
getTransactions = async () => {
|
||||||
|
try {
|
||||||
|
const response = await this.transactionsService.getAll();
|
||||||
|
if (response) {
|
||||||
|
this.setTransactions(response);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
setTransactions(transactions: Array<any>) {
|
||||||
|
this.transactions = transactions;
|
||||||
|
this.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
openModal = () => {
|
||||||
|
const _modal = this.appMain.appModal;
|
||||||
|
if (_modal) {
|
||||||
|
this.appMain.closeModal();
|
||||||
|
} else {
|
||||||
|
this.appMain.createModal("login-page");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render = () => {
|
||||||
|
return html`
|
||||||
|
<ul>
|
||||||
|
${this.transactions
|
||||||
|
? this.transactions.map((transaction) => {
|
||||||
|
html` <li>${transaction.description}</li> `;
|
||||||
|
})
|
||||||
|
: null}
|
||||||
|
</ul>
|
||||||
|
`;
|
||||||
|
};
|
||||||
|
|
||||||
|
update = () => {
|
||||||
|
render(this.render(), this);
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -44,22 +44,11 @@ class HomePageElement extends HTMLElement {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render = () => {
|
||||||
return html`
|
return html`
|
||||||
<app-link data-to="/" data-title="Main"></app-link> |
|
|
||||||
${this.appMain.isAuth
|
|
||||||
? html`<app-link data-to="/home" data-title="Home"></app-link>
|
|
||||||
|<app-link
|
|
||||||
data-to="/logout"
|
|
||||||
data-title="Logout"
|
|
||||||
></app-link>`
|
|
||||||
: html`<app-link
|
|
||||||
data-to="/login"
|
|
||||||
data-title="Login"
|
|
||||||
></app-link>`}
|
|
||||||
<button data-action="click:home-page#openModal">Test</button>
|
<button data-action="click:home-page#openModal">Test</button>
|
||||||
`;
|
`;
|
||||||
}
|
};
|
||||||
|
|
||||||
update = () => {
|
update = () => {
|
||||||
render(this.render(), this);
|
render(this.render(), this);
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ export * from "./home-page/HomePageElement";
|
|||||||
export * from "./register-page/RegisterPageElement";
|
export * from "./register-page/RegisterPageElement";
|
||||||
export * from "./login-page/LoginPageElement";
|
export * from "./login-page/LoginPageElement";
|
||||||
export * from "./not-found/NotFoundElement";
|
export * from "./not-found/NotFoundElement";
|
||||||
|
export * from "./history-page/HistoryPageElement";
|
||||||
|
|||||||
@@ -11,13 +11,14 @@ class LoginPageElement extends HTMLElement {
|
|||||||
@closest appMain: AppMainElement;
|
@closest appMain: AppMainElement;
|
||||||
authService: AuthService;
|
authService: AuthService;
|
||||||
routerService: RouterService;
|
routerService: RouterService;
|
||||||
|
errorMessage: string;
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
@update
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
this.authService = new AuthService(this.appMain.appService);
|
this.authService = new AuthService(this.appMain.appService);
|
||||||
this.routerService = this.appMain.routerService;
|
this.routerService = this.appMain.routerService;
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
get emailInput() {
|
get emailInput() {
|
||||||
@@ -65,6 +66,9 @@ class LoginPageElement extends HTMLElement {
|
|||||||
} else if (err?.errorCode == 400104) {
|
} else if (err?.errorCode == 400104) {
|
||||||
this.passwordInput.error = err?.message;
|
this.passwordInput.error = err?.message;
|
||||||
this.passwordInput.update();
|
this.passwordInput.update();
|
||||||
|
} else {
|
||||||
|
this.errorMessage = "Unable to log in!";
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -78,7 +82,7 @@ class LoginPageElement extends HTMLElement {
|
|||||||
return _return;
|
return _return;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render = () => {
|
||||||
return html`
|
return html`
|
||||||
<form>
|
<form>
|
||||||
<input-field
|
<input-field
|
||||||
@@ -96,6 +100,7 @@ class LoginPageElement extends HTMLElement {
|
|||||||
data-rules="required"
|
data-rules="required"
|
||||||
>
|
>
|
||||||
</input-field>
|
</input-field>
|
||||||
|
${this.errorMessage && html`<div>${this.errorMessage}</div>`}
|
||||||
<button type="button" data-action="click:login-page#onSubmit">
|
<button type="button" data-action="click:login-page#onSubmit">
|
||||||
Login
|
Login
|
||||||
</button>
|
</button>
|
||||||
@@ -107,7 +112,7 @@ class LoginPageElement extends HTMLElement {
|
|||||||
></app-link>
|
></app-link>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
};
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
render(this.render(), this);
|
render(this.render(), this);
|
||||||
|
|||||||
@@ -9,17 +9,18 @@ class NotFoundElement extends HTMLElement {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
@update
|
connectedCallback() {
|
||||||
connectedCallback() {}
|
this.update();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render = () => {
|
||||||
return html`
|
return html`
|
||||||
<div>404 - Page not found</div>
|
<div>404 - Page not found</div>
|
||||||
<div><app-link data-to="/" data-title="Homepage"></app-link></div>
|
<div><app-link data-to="/" data-title="Homepage"></app-link></div>
|
||||||
`;
|
`;
|
||||||
}
|
};
|
||||||
|
|
||||||
update() {
|
update = () => {
|
||||||
render(this.render(), this);
|
render(this.render(), this);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ class RegisterPageElement extends HTMLElement {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
@update
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
this.authService = new AuthService(this.appMain.appService);
|
this.authService = new AuthService(this.appMain.appService);
|
||||||
|
this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
get values(): Object {
|
get values(): Object {
|
||||||
@@ -50,7 +50,7 @@ class RegisterPageElement extends HTMLElement {
|
|||||||
return _return;
|
return _return;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render = () => {
|
||||||
return html`
|
return html`
|
||||||
<form>
|
<form>
|
||||||
<input-field
|
<input-field
|
||||||
@@ -83,9 +83,9 @@ class RegisterPageElement extends HTMLElement {
|
|||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
`;
|
`;
|
||||||
}
|
};
|
||||||
|
|
||||||
update() {
|
update = () => {
|
||||||
render(this.render(), this);
|
render(this.render(), this);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
9
src/services/TransactionsService.ts
Normal file
9
src/services/TransactionsService.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { AppService, BaseService } from "core/services";
|
||||||
|
|
||||||
|
class TransactionsService extends BaseService {
|
||||||
|
constructor(appService: AppService) {
|
||||||
|
super("/transaction", appService);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default TransactionsService;
|
||||||
9
src/services/WalletService.ts
Normal file
9
src/services/WalletService.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { AppService, BaseService } from "core/services";
|
||||||
|
|
||||||
|
class WalletService extends BaseService {
|
||||||
|
constructor(appService: AppService) {
|
||||||
|
super("/wallet", appService);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default WalletService;
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
export { default as PingService } from "./PingService";
|
export { default as PingService } from "./PingService";
|
||||||
export { default as AuthService } from "./AuthService";
|
export { default as AuthService } from "./AuthService";
|
||||||
|
export { default as WalletService } from "./WalletService";
|
||||||
|
export { default as TransactionsService } from "./TransactionsService";
|
||||||
|
|||||||
Reference in New Issue
Block a user