Skip to content

Commit d2c2d47

Browse files
authored
Change tip data type to string (#14)
1 parent 0241e23 commit d2c2d47

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

mocks/transactions-mock.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const mockTransaction = {
1010
'0xdcd2f242d04cf19bf4695606a4244da9c7ab1d7a71153bcc3010909294dcb633e14841e833f35de113f8400b9687f10b93a27d3940926ba434318a7fc639f986',
1111
signer: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
1212
nonce: 37,
13-
tip: 0,
13+
tip: '0',
1414
timestamp: 1600000000000,
1515
createdDate: '2022-08-25 23:42:49.006343',
1616
}
@@ -25,7 +25,7 @@ export const mockTransactions = [
2525
'0xdcd2f242d04cf19bf4695606a4244da9c7ab1d7a71153bcc3010909294dcb633e14841e833f35de113f8400b9687f10b93a27d3940926ba434318a7fc639f986',
2626
signer: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
2727
nonce: 33,
28-
tip: 0,
28+
tip: '0',
2929
createdDate: '2022-08-25 22:49:21.987641',
3030
},
3131
{
@@ -37,7 +37,7 @@ export const mockTransactions = [
3737
'0x4eb9be0d2604225259ca3a0f183d424122f0fc6e2694e5d2f161f1c82b14fd5079ca525f9d89b1dbbfce666cbcf4ee843787f07c15993a26cb87ca24573bc087',
3838
signer: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
3939
nonce: 32,
40-
tip: 0,
40+
tip: '0',
4141
createdDate: '2022-08-25 22:49:21.96569',
4242
},
4343
]
@@ -105,7 +105,7 @@ mockTransaction1.nonce = 0
105105
mockTransaction1.signature =
106106
'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
107107
mockTransaction1.signer = '5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM'
108-
mockTransaction1.tip = 0
108+
mockTransaction1.tip = '0'
109109
mockTransaction1.method = 'set'
110110
mockTransaction1.section = 'timestamp'
111111

@@ -116,7 +116,7 @@ mockTransaction2.nonce = 4
116116
mockTransaction2.signature =
117117
'0x984c98e3d74fcc35ddc5397282d282dcfda496ae95cb98f4e7d6d22125ec1e7cf03dc3f6fab3add1763bec4b8ee01346b198804b4faaaa1b88d37c5dbc9ca98b'
118118
mockTransaction2.signer = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'
119-
mockTransaction2.tip = 0
119+
mockTransaction2.tip = '0'
120120
mockTransaction2.method = 'call'
121121
mockTransaction2.section = 'timestamp'
122122

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ink-substrate-explorer-api",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Ink Explorer is an application that provides Ink contracts related information on Substrate based blockchains.",
55
"author": "Blockcoders <[email protected]>",
66
"license": "MIT",

src/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ type Transaction {
8585
signer: String
8686
ss58: String
8787
timestamp: Float!
88-
tip: Int
88+
tip: String
8989
tokens: String
9090
type: Int
9191
version: Int

src/transactions/entity/transaction.entity.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ export class Transaction extends BaseEntity {
6363
@Field(/* istanbul ignore next */ () => Int, { nullable: true })
6464
nonce?: number
6565

66-
@Column('int')
67-
@Field(/* istanbul ignore next */ () => Int, { nullable: true })
68-
tip?: number
66+
@Column()
67+
@Field(/* istanbul ignore next */ () => String, { nullable: true })
68+
tip?: string
6969

7070
@Column('int')
7171
@Field(/* istanbul ignore next */ () => Int, { nullable: true })

src/transactions/transactions.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class TransactionsService {
6969
signature: signature.toString(),
7070
signer: signer.toString(),
7171
nonce: nonce.toNumber(),
72-
tip: tip.toNumber(),
72+
tip: tip.toString(),
7373
timestamp,
7474
version,
7575
type: type,

0 commit comments

Comments
 (0)