fix fix fix
This commit is contained in:
+6
-6
@@ -100,33 +100,33 @@ class Api {
|
||||
return this.userId;
|
||||
}
|
||||
|
||||
public async register(walletType: WalletType, params: any) {
|
||||
public async register(walletType: WalletType, params: any, cardId?: string) {
|
||||
const res = await fetch(`${Api.BASE_URL}/register`, {
|
||||
method: 'POST',
|
||||
headers: this.headers(),
|
||||
body: JSON.stringify({ walletType, params }),
|
||||
body: JSON.stringify({ walletType, params, cardId }),
|
||||
});
|
||||
const data = await res.json();
|
||||
if (!data.success) throw new Error(data.message);
|
||||
return data;
|
||||
}
|
||||
|
||||
public async requestOTP(walletType: WalletType, mobile: string, params: any = {}) {
|
||||
public async requestOTP(walletType: WalletType, mobile: string, params: any = {}, cardId?: string) {
|
||||
const res = await fetch(`${Api.BASE_URL}/request-otp`, {
|
||||
method: 'POST',
|
||||
headers: this.headers(),
|
||||
body: JSON.stringify({ walletType, mobile, params }),
|
||||
body: JSON.stringify({ walletType, mobile, params, cardId }),
|
||||
});
|
||||
const data = await res.json();
|
||||
if (!data.success) throw new Error(data.message);
|
||||
return data;
|
||||
}
|
||||
|
||||
public async verifyOTP(walletType: WalletType, mobile: string, otp: string, params: any = {}) {
|
||||
public async verifyOTP(walletType: WalletType, mobile: string, otp: string, params: any = {}, cardId?: string) {
|
||||
const res = await fetch(`${Api.BASE_URL}/verify-otp`, {
|
||||
method: 'POST',
|
||||
headers: this.headers(),
|
||||
body: JSON.stringify({ walletType, mobile, otp, params }),
|
||||
body: JSON.stringify({ walletType, mobile, otp, params, cardId }),
|
||||
});
|
||||
const data = await res.json();
|
||||
if (!data.success) throw new Error(data.message);
|
||||
|
||||
Reference in New Issue
Block a user