Skip to content

Uppercase address in the "action" content causing signature error. #103

Closed
@nom4dv3

Description

@nom4dv3

Bug brief

When calling "spotDeploy" api, if the address list in "userAndWei" involves uppercase, it leads to signature error: L1 error: User or API Wallet 0xe62b09a760b8bd649cc678767fbb74c868b05111 does not exist., which is quite misleading.

How to reproduce

use the following to send api

action = {
        "type": "spotDeploy",
        "userGenesis":{
            "token": TOKEN_ID,
            # note: address should use lowercase, uppercase would cause signature error.
            "userAndWei": [["0xABCDEABCDEABCDEABCDEABCDEABCDEABCDEABCDE","0"]],
            "existingTokenAndWei": []
        }
    }

Suggestions

  1. In the chain node side, use the original message to recover signer address from signature rather the lowercase ones
  2. or, on the sdk side, either support auto toLowercase or throw error when it has uppercase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions