line / line-blockchain-developers-sdk-js

Javascript library for line blockchain developers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sevice Wallet Address Validation Error in Ebony

KIM-KOOKHYUN opened this issue · comments

Default information

  • lbd-sdk-js version: e.g. 1.4.6
  • nodeJs version: e.g. v10.x.x.
  • module-type(specify type value in package.json): e.g. commonJs

Description of the bug

There is a bug when serviceWalletAddress (tlink~~) in ebony is validated

  • service wallet address : tlink14vvjtkr39ssmy9qrhv7egrxw8kg5ylpj6l07r8 ,link14vvjtkr39ssmy9qrhv7egrxw8kg5ylpj6l07r8
  • chain : ebony, finschia

Example codes

if (RequestParameterValidator.isValidWalletAddress(serviceWalletAddress)) {

if (RequestParameterValidator.isValidWalletAddress(recipientWalletAddress)) {

See the code above,

  • as-is
    if (RequestParameterValidator.isValidWalletAddress(serviceWalletAddress))
  • to-be
    if (!RequestParameterValidator.isValidWalletAddress(serviceWalletAddress))

Error logs

Error: Invalid serviceWalletAddress - valid pattern: ^t?link[a-zA-Z0-9]{39}$
at new IssueServiceTokenRequest (node_modules/@line/lbd-sdk-js/dist/request.js:38:19)
at Context. (file:///Users/user/git/developers-sdk-js-qa-client/src/test/service-token-creation-controller/CreateAndServiceToken.spec.ts:13:49)
at processImmediate (node:internal/timers:478:21)

Anything else we need to know

Fixed by #125

FIXED