Skip to content

Commit 1edd0bd

Browse files
committed
contract: Add 'identifier' prefix to static method 'name'
1 parent 268bd0b commit 1edd0bd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/commands/init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const processInitForm = async (
170170
name: 'contract',
171171
message: () => {
172172
ProtocolContract = protocolInstance.getContract()
173-
return `Contract ${ProtocolContract.name()}`
173+
return `Contract ${ProtocolContract.identifierName()}`
174174
},
175175
skip: fromExample !== undefined,
176176
initial: contract,
@@ -183,7 +183,7 @@ const processInitForm = async (
183183

184184
// Validate whether the address is valid
185185
if (!contract.validate()) {
186-
return `Contract ${ProtocolContract.name()} is invalid: ${value}\n${ProtocolContract.errorMessage()}`
186+
return `Contract ${ProtocolContract.identifierName()} is invalid: ${value}\n${ProtocolContract.errorMessage()}`
187187
}
188188

189189
return true

src/protocols/ethereum/contract.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = class EthereumContract {
2-
static name() {
2+
static identifierName() {
33
return 'address'
44
}
55

src/protocols/near/contract.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const MINIMUM_ACCOUNT_ID_LENGTH = 2
22
const MAXIMUM_ACCOUNT_ID_LENGTH = 64
33

44
module.exports = class NearContract {
5-
static name() {
5+
static identifierName() {
66
return 'account'
77
}
88

src/validation/manifest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ const validateManifest = (value, type, schema, protocol, { resolveFile }) => {
285285
const validateContractValues = (manifest, protocol) => {
286286
const ProtocolContract = protocol.getContract()
287287

288-
const fieldName = ProtocolContract.name()
288+
const fieldName = ProtocolContract.identifierName()
289289
const errorMessage = ProtocolContract.errorMessage()
290290

291291
return manifest

0 commit comments

Comments
 (0)