aboutsummaryrefslogtreecommitdiffstats
path: root/common/types.go
diff options
context:
space:
mode:
authorPaulo L F Casaretto <pcasaretto@gmail.com>2016-04-22 10:33:24 +0800
committerPaulo L F Casaretto <pcasaretto@gmail.com>2016-04-26 20:12:36 +0800
commita20d3fc3625c8ccdd025e0dff96cde5d48586b08 (patch)
tree6e4f9f2c78abeba790b7940d175ffb79a17c04f3 /common/types.go
parent18580e152c1a2480b6245ebba4c62c202ed20ac6 (diff)
downloadgo-tangerine-a20d3fc3625c8ccdd025e0dff96cde5d48586b08.tar
go-tangerine-a20d3fc3625c8ccdd025e0dff96cde5d48586b08.tar.gz
go-tangerine-a20d3fc3625c8ccdd025e0dff96cde5d48586b08.tar.bz2
go-tangerine-a20d3fc3625c8ccdd025e0dff96cde5d48586b08.tar.lz
go-tangerine-a20d3fc3625c8ccdd025e0dff96cde5d48586b08.tar.xz
go-tangerine-a20d3fc3625c8ccdd025e0dff96cde5d48586b08.tar.zst
go-tangerine-a20d3fc3625c8ccdd025e0dff96cde5d48586b08.zip
common: Add tests for Address#UnmarshalJSON
Diffstat (limited to 'common/types.go')
-rw-r--r--common/types.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/types.go b/common/types.go
index fec986164..d00884484 100644
--- a/common/types.go
+++ b/common/types.go
@@ -167,7 +167,7 @@ func (a Address) MarshalJSON() ([]byte, error) {
// Parse address from raw json data
func (a *Address) UnmarshalJSON(data []byte) error {
if len(data) > 2 && data[0] == '"' && data[len(data)-1] == '"' {
- data = data[:len(data)-1][1:]
+ data = data[1 : len(data)-1]
}
if len(data) > 2 && data[0] == '0' && data[1] == 'x' {