Skip to content

Commit

Permalink
Release 1.0.1 to develop (#129)
Browse files Browse the repository at this point in the history
### What

[Release 1.0.1](#127) to develop

### Why

To sync the `main` branch hotfixes:
- #125 
- #126
  • Loading branch information
marcelosalloum authored Dec 16, 2023
1 parent a37fba0 commit c26c2f5
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 15 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Add sorting to `GET /users` endpoint [#104](https://github.com/stellar/stellar-disbursement-platform-backend/pull/104)

## [1.0.1](https://github.com/stellar/stellar-disbursement-platform-backend/compare/1.0.0...1.0.1)

### Changed

- Update log message for better debugging. [#125](https://github.com/stellar/stellar-disbursement-platform-backend/pull/125)

### Fixed

- Fix client_domain from the Viobrant Assist wallet. [#126](https://github.com/stellar/stellar-disbursement-platform-backend/pull/126)

## [1.0.0](https://github.com/stellar/stellar-disbursement-platform-backend/compare/1.0.0-rc2...1.0.0)

### Added
Expand Down
4 changes: 2 additions & 2 deletions cmd/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func Test_DatabaseCommand_db_setup_for_network(t *testing.T) {
// Test the two wallets
assert.Equal(t, "Vibrant Assist", vibrantAssist.Name)
assert.Equal(t, "https://vibrantapp.com/vibrant-assist", vibrantAssist.Homepage)
assert.Equal(t, "api.vibrantapp.com", vibrantAssist.SEP10ClientDomain)
assert.Equal(t, "vibrantapp.com", vibrantAssist.SEP10ClientDomain)
assert.Equal(t, "https://vibrantapp.com/sdp", vibrantAssist.DeepLinkSchema)

assert.Equal(t, "Vibrant Assist RC", vibrantAssistRC.Name)
Expand All @@ -244,7 +244,7 @@ func Test_DatabaseCommand_db_setup_for_network(t *testing.T) {
"Name: Vibrant Assist",
"Homepage: https://vibrantapp.com/vibrant-assist",
"Deep Link Schema: https://vibrantapp.com/sdp",
"SEP-10 Client Domain: api.vibrantapp.com",
"SEP-10 Client Domain: vibrantapp.com",
}

logs := buf.String()
Expand Down
2 changes: 1 addition & 1 deletion helmchart/sdp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: stellar-disbursement-platform
description: A Helm chart for the Stellar Disbursement Platform Backend (A.K.A. `sdp`)
version: 0.9.3
appVersion: "1.0.0"
appVersion: "1.0.1"
type: application
maintainers:
- name: Stellar Development Foundation
Expand Down
7 changes: 4 additions & 3 deletions internal/serve/httphandler/receiver_send_otp_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ func (h ReceiverSendOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request
return
}

truncatedPhoneNumber := utils.TruncateString(receiverSendOTPRequest.PhoneNumber, 3)
if phoneValidateErr := utils.ValidatePhoneNumber(receiverSendOTPRequest.PhoneNumber); phoneValidateErr != nil {
extras := map[string]interface{}{"phone_number": "phone_number is required"}
if !errors.Is(phoneValidateErr, utils.ErrEmptyPhoneNumber) {
phoneValidateErr = fmt.Errorf("validating phone number %s: %w", utils.TruncateString(receiverSendOTPRequest.PhoneNumber, len(receiverSendOTPRequest.PhoneNumber)/4), phoneValidateErr)
phoneValidateErr = fmt.Errorf("validating phone number %s: %w", truncatedPhoneNumber, phoneValidateErr)
log.Ctx(ctx).Error(phoneValidateErr)
extras["phone_number"] = "invalid phone number provided"
}
Expand Down Expand Up @@ -117,7 +118,7 @@ func (h ReceiverSendOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request
}

if numberOfUpdatedRows < 1 {
log.Ctx(ctx).Warnf("updated no rows in receiver send OTP handler for phone number: %s", utils.TruncateString(receiverSendOTPRequest.PhoneNumber, len(receiverSendOTPRequest.PhoneNumber)/4))
log.Ctx(ctx).Warnf("updated no rows in ReceiverSendOTPHandler, please verify if the provided phone number (%s) and client_domain (%s) are both valid", truncatedPhoneNumber, sep24Claims.ClientDomainClaim)
} else {
sendOTPData := ReceiverSendOTPData{
OTP: newOTP,
Expand Down Expand Up @@ -147,7 +148,7 @@ func (h ReceiverSendOTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request
Message: builder.String(),
}

log.Ctx(ctx).Infof("sending OTP message to phone number: %s", utils.TruncateString(receiverSendOTPRequest.PhoneNumber, 3))
log.Ctx(ctx).Infof("sending OTP message to phone number: %s", truncatedPhoneNumber)
err = h.SMSMessengerClient.SendMessage(smsMessage)
if err != nil {
httperror.InternalError(ctx, "Cannot send OTP message", err, nil).Render(w)
Expand Down
12 changes: 6 additions & 6 deletions internal/services/setup_wallets_for_network_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Test_SetupWalletsForProperNetwork(t *testing.T) {
"Name: Vibrant Assist",
"Homepage: https://vibrantapp.com/vibrant-assist",
"Deep Link Schema: https://vibrantapp.com/sdp",
"SEP-10 Client Domain: api.vibrantapp.com",
"SEP-10 Client Domain: vibrantapp.com",
}

logs := buf.String()
Expand Down Expand Up @@ -101,7 +101,7 @@ func Test_SetupWalletsForProperNetwork(t *testing.T) {
Name: "Vibrant Assist",
Homepage: "https://vibrantapp.com/vibrant-assist",
DeepLinkSchema: "https://aidpubnet.netlify.app",
SEP10ClientDomain: "api.vibrantapp.com",
SEP10ClientDomain: "vibrantapp.com",
},
{
Name: "BOSS Money",
Expand Down Expand Up @@ -130,7 +130,7 @@ func Test_SetupWalletsForProperNetwork(t *testing.T) {

assert.Equal(t, "Vibrant Assist", wallets[1].Name)
assert.Equal(t, "https://vibrantapp.com/vibrant-assist", wallets[1].Homepage)
assert.Equal(t, "api.vibrantapp.com", wallets[1].SEP10ClientDomain)
assert.Equal(t, "vibrantapp.com", wallets[1].SEP10ClientDomain)
assert.Equal(t, "https://aidpubnet.netlify.app", wallets[1].DeepLinkSchema)

expectedLogs := []string{
Expand All @@ -142,7 +142,7 @@ func Test_SetupWalletsForProperNetwork(t *testing.T) {
"Name: Vibrant Assist",
"Homepage: https://vibrantapp.com/vibrant-assist",
"Deep Link Schema: https://aidpubnet.netlify.app",
"SEP-10 Client Domain: api.vibrantapp.com",
"SEP-10 Client Domain: vibrantapp.com",
}

logs := buf.String()
Expand All @@ -164,7 +164,7 @@ func Test_SetupWalletsForProperNetwork(t *testing.T) {
Name: "Vibrant Assist",
Homepage: "https://vibrantapp.com/vibrant-assist",
DeepLinkSchema: "https://aidpubnet.netlify.app",
SEP10ClientDomain: "api.vibrantapp.com",
SEP10ClientDomain: "vibrantapp.com",
Assets: []data.Asset{
{
Code: "USDC",
Expand Down Expand Up @@ -253,7 +253,7 @@ func Test_SetupWalletsForProperNetwork(t *testing.T) {
"Name: Vibrant Assist",
"Homepage: https://vibrantapp.com/vibrant-assist",
"Deep Link Schema: https://aidpubnet.netlify.app",
"SEP-10 Client Domain: api.vibrantapp.com",
"SEP-10 Client Domain: vibrantapp.com",
"Assets:",
"* USDC - GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
}
Expand Down
2 changes: 1 addition & 1 deletion internal/services/wallets/wallets_pubnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var PubnetWallets = []data.Wallet{
Name: "Vibrant Assist",
Homepage: "https://vibrantapp.com/vibrant-assist",
DeepLinkSchema: "https://vibrantapp.com/sdp",
SEP10ClientDomain: "api.vibrantapp.com",
SEP10ClientDomain: "vibrantapp.com",
Assets: []data.Asset{
assets.USDCAssetPubnet,
},
Expand Down
2 changes: 1 addition & 1 deletion internal/transactionsubmission/utils/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func NewHorizonErrorWrapper(err error) *HorizonErrorWrapper {

resultCodes, resCodeErr := hError.ResultCodes()
if resCodeErr != nil {
log.Errorf("parsing result_codes: %v", resCodeErr)
log.Warnf("parsing result_codes: %v", resCodeErr)
}

return &HorizonErrorWrapper{
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// Version is the official version of this application. Whenever it's changed
// here, it also needs to be updated at the `helmchart/Chart.yaml#appVersion“.
const Version = "1.0.0"
const Version = "1.0.1"

// GitCommit is populated at build time by
// go build -ldflags "-X main.GitCommit=$GIT_COMMIT"
Expand Down

0 comments on commit c26c2f5

Please sign in to comment.