Skip to content

Commit

Permalink
🚧 [api]: throw error rather than silence fail #93
Browse files Browse the repository at this point in the history
  • Loading branch information
apolkingg8 committed Nov 5, 2021
1 parent bc2cabc commit 309714b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class EthService {

async onChargebackCreated(chargebackAddress: string) {
if (!this.provider) {
return
throw 'Provider is not defined.'
}

let slmChargeback = await SlmChargeback__factory.connect(
Expand All @@ -31,7 +31,7 @@ export class EthService {

async onPreorderCreated(preorderAddress: string) {
if (!this.provider) {
return
throw 'Provider is not defined.'
}

let slmPreorder = await SlmPreorder__factory.connect(preorderAddress, this.provider)
Expand All @@ -42,7 +42,7 @@ export class EthService {

async onEscrowCreated(escrowAddress: string) {
if (!this.provider) {
return
throw 'Provider is not defined.'
}

let slmEscrow = await SlmEscrow__factory.connect(escrowAddress, this.provider)
Expand All @@ -53,7 +53,7 @@ export class EthService {

async getChargebackCreatedLogs() {
if (!this.contract) {
return
throw 'Contract is not defined.'
}

let eventFilter = this.contract.filters.ChargebackCreated()
Expand All @@ -66,7 +66,7 @@ export class EthService {

async getPreorderCreatedLogs() {
if (!this.contract) {
return
throw 'Contract is not defined.'
}

let eventFilter = this.contract.filters.PreorderCreated()
Expand All @@ -79,7 +79,7 @@ export class EthService {

async getEscrowCreatedLogs() {
if (!this.contract) {
return
throw 'Contract is not defined.'
}

let eventFilter = this.contract.filters.EscrowCreated()
Expand Down

0 comments on commit 309714b

Please sign in to comment.