Skip to content

Commit

Permalink
Encode verification code with base64 (ethereum#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
asaj authored and cmcewen committed Sep 12, 2018
1 parent 0673ea0 commit 4e6f451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions abe/abe.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package abe

import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
Expand All @@ -27,7 +28,6 @@ import (

"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
Expand All @@ -53,7 +53,7 @@ func createVerificationMessage(request types.VerificationRequest, account accoun
if err != nil {
return "", err
}
return fmt.Sprintf("Celo verification code: %s:%d", hexutil.Encode(signature), request.VerificationIndex), nil
return fmt.Sprintf("Celo verification code: %s:%d", base64.URLEncoding.EncodeToString(signature), request.VerificationIndex), nil
}

func sendSms(phoneNumber string, message string) error {
Expand Down

0 comments on commit 4e6f451

Please sign in to comment.