message: fix encoding problem of signature
diff: @@ -9,6 +9,22 @@ import { IRpcMethod } from "iotex-antenna/lib/rpc-method/types";
  import { ABI } from "./abi";
  import { ERC20, IERC20 } from "./erc20";
  +function hexToBytes(hexStr: string): Array<number> {
  + const matches = hexStr.match(/^(0x)?([0-9a-fA-F]*)$/);
  + if (!matches || matches.length < 3) {
  + throw new Error(`Given value "${hexStr}" is not a valid hex string.`);
  + }
  +
  + const hex = matches[2].length % 2 ? `0${matches[2]}` : matches[2];
  +
  + const bytes = [];
  + for (let c = 0; c < hex.length; c += 2) {
  + bytes.push(parseInt(hex.substr(c, 2), 16));
  + }
  +
  + return bytes;
  +}
  +
  export interface IVita extends IERC20 {
  claim(account: Account, gasPrice: string, gasLimit: string): Promise<string>;
  claimAs(
  @@ -52,7 +68,7 @@ export class Vita extends ERC20 implements IVita {
  gasLimit,
  "0",
  owner,
  - signature,
  + hexToBytes(signature),
  nonce.toString()
  );
  }
  