Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cust linking xyzabc 3 #1886

Merged
merged 4 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/wallet/controllers_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ func TestLinkXyzAbcWalletV3(t *testing.T) {
"POST",
fmt.Sprintf("/v3/wallet/xyzabc/%s/claim", idFrom),
bytes.NewBufferString(fmt.Sprintf(
`{"linkingInfo": "%s"}`,
`{"linking_info": "%s"}`,
linkingInfo,
)),
)
Expand Down
2 changes: 1 addition & 1 deletion services/wallet/inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func (lbdar *LinkBraveDepositAccountRequest) HandleErrors(err error) *handlers.A

// XyzAbcLinkingRequest holds info needed to link xyzabc account.
type XyzAbcLinkingRequest struct {
VerificationToken string `json:"linkingInfo"`
VerificationToken string `json:"linking_info"`
}

// Validate implements DecodeValidate interface.
Expand Down
3 changes: 1 addition & 2 deletions services/wallet/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,7 @@ func (service *Service) LinkXyzAbcWallet(ctx context.Context, walletID uuid.UUID
providerLinkingID := uuid.NewV5(ClaimNamespace, accountID)

// tx.Destination will be stored as UserDepositDestination in the wallet info upon linking.
// FIXME - correct country
if err := service.Datastore.LinkWallet(ctx, walletID.String(), depositID, providerLinkingID, nil, "xyzabc", "US"); err != nil {
if err := service.Datastore.LinkWallet(ctx, walletID.String(), depositID, providerLinkingID, nil, "xyzabc", "IN"); err != nil {
if errors.Is(err, ErrUnusualActivity) {
return handlers.WrapError(err, "unable to link - unusual activity", http.StatusBadRequest)
}
Expand Down