feat: add token_type metadata for rosetta ft operations (#1332)

This commit is contained in:
Rafael Cárdenas
2022-09-23 10:14:34 -05:00
committed by GitHub
parent 7d010859f2
commit 09af27b24b
2 changed files with 24 additions and 0 deletions

View File

@@ -379,6 +379,9 @@ function makeFtBurnOperation(
decimals: ftMetadata.decimals,
symbol: ftMetadata.symbol,
},
metadata: {
token_type: 'ft',
},
},
};
@@ -426,6 +429,9 @@ function makeFtMintOperation(
decimals: ftMetadata.decimals,
symbol: ftMetadata.symbol,
},
metadata: {
token_type: 'ft',
},
},
};
@@ -477,6 +483,9 @@ function makeFtSenderOperation(
decimals: ftMetadata.decimals,
symbol: ftMetadata.symbol,
},
metadata: {
token_type: 'ft',
},
},
coin_change: {
coin_action: CoinAction.CoinSpent,
@@ -541,6 +550,9 @@ function makeFtReceiverOperation(
decimals: ftMetadata.decimals,
symbol: ftMetadata.symbol,
},
metadata: {
token_type: 'ft',
},
},
coin_change: {
coin_action: CoinAction.CoinCreated,

View File

@@ -170,6 +170,9 @@ describe('/block tests', () => {
symbol: 'NYC',
},
value: '-7500',
metadata: {
token_type: 'ft',
},
},
coin_change: {
coin_action: 'coin_spent',
@@ -193,6 +196,9 @@ describe('/block tests', () => {
symbol: 'NYC',
},
value: '7500',
metadata: {
token_type: 'ft',
},
},
coin_change: {
coin_action: 'coin_created',
@@ -249,6 +255,9 @@ describe('/block tests', () => {
symbol: 'NYC',
},
value: '-100',
metadata: {
token_type: 'ft',
},
},
operation_identifier: {
index: 1,
@@ -294,6 +303,9 @@ describe('/block tests', () => {
symbol: 'NYC',
},
value: '500',
metadata: {
token_type: 'ft',
},
},
operation_identifier: {
index: 1,