Skip to content

Commit

Permalink
Forget to commit this file ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Mar 20, 2021
1 parent 72895d4 commit 7b6cef8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/src/trading/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ export default class TradeProcessor {
await this.pipeline.execute(createContext(offer, this));
}

async decline(offer: Offer) {
await offer.decline((err) => {
async decline(offer: OfferContext) {
this.account.storage.saveTransaction(offer, true)
await offer.offer.decline((err) => {
if (err) throw err;
});
}

async accept(offer: Offer) {
this.account.community.checkConfirmations();
await offer.accept((err) => {
async accept(offer: OfferContext) {
const {community, storage} = this.account;
community.checkConfirmations();
storage.saveTransaction(offer, true)
await offer.offer.accept((err) => {
if (err) throw err;
});
}
Expand Down

0 comments on commit 7b6cef8

Please sign in to comment.