diff --git a/src/modules/service/depositService.ts b/src/modules/service/depositService.ts index 5e9b6ad..f2f3bca 100644 --- a/src/modules/service/depositService.ts +++ b/src/modules/service/depositService.ts @@ -7,7 +7,7 @@ import { HISTORY_TYPE } from "../../types/type"; export default class DepositService extends ServiceBase { async requestDeposit(appName: string, amount: number, userAddress?: string) { const transferKey = Date.now(); - userAddress = userAddress ? userAddress : this.wallet.getDefaultAccount(); + userAddress = userAddress ? userAddress : this.wallet.getDefaultAddress(); const depositAddress = await this.getDepositAddress(appName); const op_list: SetOperation[] = [ diff --git a/src/modules/service/useService.ts b/src/modules/service/useService.ts index 991231c..0fa93fe 100644 --- a/src/modules/service/useService.ts +++ b/src/modules/service/useService.ts @@ -7,7 +7,7 @@ import ServiceBase from "./serviceBase"; export default class UseService extends ServiceBase{ async writeRequest(appName: string, serviceName: string, value: string, requesterAddress?: string) { const requestKey = Date.now(); - requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); + requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAddress(); const requestPath = Path.app(appName).request(serviceName, requesterAddress, requestKey); const requestData = { prompt: value, @@ -19,7 +19,7 @@ export default class UseService extends ServiceBase{ } async calculateCostAndCheckBalance(appName: string, serviceName: string, value: string, requesterAddress?: string) { - requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAccount(); + requesterAddress = requesterAddress ? requesterAddress : this.wallet.getDefaultAddress(); const billingConfig = await this.app.getBillingConfig(appName); // TODO(woojae): calculate cost more accurately let serviceBillingConfig = billingConfig.service.default;