Skip to content

Commit

Permalink
use symbols instead of strings when subscribing to token events
Browse files Browse the repository at this point in the history
  • Loading branch information
aristidesstaffieri committed Nov 29, 2023
1 parent 9e735ff commit a672def
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/service/mercury/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,19 @@ export class MercuryClient {
const transferToSub = {
contract_id: contractId,
max_single_size: 200,
topic1: nativeToScVal("transfer").toXDR("base64"),
topic2: nativeToScVal(pubKey).toXDR("base64"),
topic1: xdr.ScVal.scvSymbol("transfer").toXDR("base64"),
topic2: xdr.ScVal.scvSymbol(pubKey).toXDR("base64"),
};
const transferFromSub = {
contract_id: contractId,
max_single_size: 200,
topic1: nativeToScVal("transfer").toXDR("base64"),
topic3: nativeToScVal(pubKey).toXDR("base64"),
topic1: xdr.ScVal.scvSymbol("transfer").toXDR("base64"),
topic3: xdr.ScVal.scvSymbol(pubKey).toXDR("base64"),
};
const mintSub = {
contract_id: contractId,
max_single_size: 200,
topic1: nativeToScVal("mint").toXDR("base64"),
topic1: xdr.ScVal.scvSymbol("mint").toXDR("base64"),
};

try {
Expand Down

0 comments on commit a672def

Please sign in to comment.