Rename approved to approvedAddress

This commit is contained in:
Leonid Logvinov
2018-06-29 16:03:52 +03:00
parent 294d3bbdc1
commit ac9175bf88

View File

@@ -360,8 +360,8 @@ export class ERC721TokenWrapper extends ContractWrapper {
normalizedSenderAddress,
);
if (!isApprovedForAll) {
const approved = await this.getApprovedIfExistsAsync(normalizedTokenAddress, tokenId);
if (approved !== senderAddress) {
const approvedAddress = await this.getApprovedIfExistsAsync(normalizedTokenAddress, tokenId);
if (approvedAddress !== senderAddress) {
throw new Error(ContractWrappersError.ERC721NoApproval);
}
}