Skip to content

Commit

Permalink
fix trace view not unsubscribing
Browse files Browse the repository at this point in the history
  • Loading branch information
RamRamez committed Sep 27, 2021
1 parent f035617 commit 8b9c763
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/services/TraceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class TraceService {
} else if (slug) {
query.slug = slug;
}
traces

return traces
.watch({ listStrategy: 'always' })
.find({ query })
.subscribe(resp => {
Expand Down Expand Up @@ -971,19 +972,21 @@ class TraceService {
* Withdraw the donations (pledges) from a trace
* Only possible when the traces was approved for completion
*
* @param trace a Trace model
* @param trace a Trace model
* @param from (string) Ethereum address
* @param onTxHash Callback function once the transaction was created
* @param onConfirmation Callback function once the transaction was mined
* @param onError Callback function if error is encountered
* @param selectedToken Selected Token to withdraw
* @param web3
*/

static withdraw({ trace, from, onTxHash, onConfirmation, onError, web3 }) {
static withdraw({ trace, from, onTxHash, onConfirmation, onError, web3, selectedTokens }) {
let txHash;

DonationBlockchainService.getTraceDonations(trace._id)
DonationBlockchainService.getTraceDonations(trace._id, selectedTokens)
.then(data => {
// console.log(data);

const traceContract = trace.contract(web3);

const execute = opts => {
Expand Down

0 comments on commit 8b9c763

Please sign in to comment.