small improvements

This commit is contained in:
Michele Balistreri 2020-04-03 08:56:24 +03:00
parent cd909d6adc
commit a9574f14ca
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A
1 changed files with 6 additions and 2 deletions

View File

@ -132,8 +132,12 @@ interface SignRedeemResponse {
async function signRedeem(web3Type: Web3Type, contractAddress: string, signer: string, message: RedeemMessage): Promise<SignRedeemResponse> { async function signRedeem(web3Type: Web3Type, contractAddress: string, signer: string, message: RedeemMessage): Promise<SignRedeemResponse> {
const chainId = await config.web3!.eth.net.getId(); const chainId = await config.web3!.eth.net.getId();
let block = await config.web3!.eth.getBlock("latest"); const block = await config.web3!.eth.getBlock("latest");
let finalMessage = {blockNumber: block.number, blockHash: block.hash, receiver: message.receiver, code: message.code}; const finalMessage = {
...message,
blockNumber: block.number,
blockHash: block.hash
};
const domain = [ const domain = [
{ name: "name", type: "string" }, { name: "name", type: "string" },