Skip to content

Commit

Permalink
fix(tapd): resolve breaking changes in tapd v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaljsr committed Nov 14, 2023
1 parent cf2b15b commit 6211ab4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion electron/tapd/tapdProxyServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const decodeAddress = async (args: {

const assetRoots = async (args: { node: TapdNode }): Promise<TARO.AssetRootResponse> => {
const { universe } = await getRpc(args.node);
return await universe.assetRoots();
return await universe.assetRoots({ withAmountsById: true });
};

const assetLeaves = async (args: {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/tap/tapd/tapdService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class TapdService implements TapService {
return {
id: genesis.assetId.toString(),
name: genesis.name,
type: asset.assetType,
type: genesis.assetType,
amount: asset.amount,
genesisPoint: genesis.genesisPoint,
anchorOutpoint: anchor.anchorOutpoint,
Expand All @@ -95,7 +95,7 @@ class TapdService implements TapService {
balances.push({
id,
name: genesis.name,
type: asset.assetType,
type: genesis.assetType,
balance: asset.balance,
genesisPoint: genesis.genesisPoint,
});
Expand Down
2 changes: 2 additions & 0 deletions src/shared/tapdDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const defaultTapdListBalances = (

export const defaultTapdMintAsset = (): MintAssetResponse => ({
pendingBatch: {
batchTxid: '',
batchKey: Buffer.from(''),
assets: [],
state: 'BATCH_STATE_PEDNING',
Expand All @@ -37,6 +38,7 @@ export const defaultTapdFinalizeBatch = (
value: Partial<FinalizeBatchResponse>,
): FinalizeBatchResponse => ({
batch: {
batchTxid: '',
batchKey: Buffer.from(''),
assets: [],
state: 'BATCH_STATE_FINALIZED',
Expand Down

0 comments on commit 6211ab4

Please sign in to comment.