Skip to content

Commit 5cb991e

Browse files
authored
fix: update docs (#4)
1 parent 84c0ea1 commit 5cb991e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ try {
9898
const tx = await WETH.transfer('0x0', amount)
9999
await tx.wait()
100100
} catch (err) {
101-
const { reason } = errorDecoder.decode(err)
101+
const { reason } = await errorDecoder.decode(err)
102102
// Prints "ERC20: transfer to the zero address"
103103
console.log('Revert reason:', reason)
104104
}
@@ -116,7 +116,7 @@ try {
116116
const tx = await OverflowContract.add(123)
117117
await tx.wait()
118118
} catch (err) {
119-
const { reason } = errorDecoder.decode(err)
119+
const { reason } = await errorDecoder.decode(err)
120120
// Prints "Arithmetic operation underflowed or overflowed outside of an unchecked block"
121121
console.log('Panic message:', reason)
122122
}

0 commit comments

Comments
 (0)