Skip to content

Conversation

@mkurapov
Copy link
Contributor

@mkurapov mkurapov commented Sep 5, 2025

Changes proposed in this pull request

Updating createOutgoingPaymentFromIncomingPayment backend mutation to have debitAmount as optional. This allows to create outgoing payments directly from incoming payments which have a defined incomingAmount. This updated behaviour will be used in the cardService to create outgoing payments directly from the incoming payment at the "merchant" Rafiki.

Merging into main as this can be used outside of the card/POS projects.

Context

Works towards RAF-1155/#3630

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Make sure that all checks pass
  • Bruno collection updated (if necessary)
  • Documentation issue created with user-docs label (if necessary)
  • OpenAPI specs updated (if necessary)

@netlify
Copy link

netlify bot commented Sep 5, 2025

Deploy Preview for brilliant-pasca-3e80ec canceled.

Name Link
🔨 Latest commit d1afa3d
🔍 Latest deploy log https://app.netlify.com/projects/brilliant-pasca-3e80ec/deploys/68bac61ed1dedb0008ba0406

@github-actions github-actions bot added type: tests Testing related pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. type: source Changes business logic pkg: mock-ase pkg: mock-account-service-lib labels Sep 5, 2025
@mkurapov mkurapov changed the title Max/raf 1155 feat(backend): optional debitAmount increateOutgoingPaymentFromIncomingPayment mutation Sep 5, 2025
@github-actions
Copy link

github-actions bot commented Sep 5, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 45.32
  • Iterations/s: 15.10
  • Failed Requests: 0.00% (0 of 2725)
📜 Logs

> [email protected] run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 983 kB 16 kB/s
     data_sent......................: 2.1 MB 35 kB/s
     http_req_blocked...............: avg=6.2µs    min=2.07µs   med=5.05µs   max=514.65µs p(90)=6.22µs   p(95)=6.67µs  
     http_req_connecting............: avg=361ns    min=0s       med=0s       max=445.54µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=87.65ms  min=7.47ms   med=73.9ms   max=621.26ms p(90)=146.02ms p(95)=166.81ms
       { expected_response:true }...: avg=87.65ms  min=7.47ms   med=73.9ms   max=621.26ms p(90)=146.02ms p(95)=166.81ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2725
     http_req_receiving.............: avg=83.49µs  min=20.99µs  med=72.05µs  max=2.93ms   p(90)=109.75µs p(95)=137.99µs
     http_req_sending...............: avg=34.56µs  min=8.51µs   med=26.08µs  max=2.31ms   p(90)=38.77µs  p(95)=53.07µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=87.53ms  min=7.28ms   med=73.78ms  max=621.18ms p(90)=145.88ms p(95)=166.7ms 
     http_reqs......................: 2725   45.32065/s
     iteration_duration.............: avg=264.63ms min=174.92ms med=249.67ms max=1.17s    p(90)=324.71ms p(95)=354.47ms
     iterations.....................: 908    15.101339/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

'Could not create quote. One of receiveAmount, debitAmount or incomingAmount (on the incoming payment) is required.'
)
throw new QuoteError(QuoteErrorCode.InvalidReceiver)
throw new QuoteError(QuoteErrorCode.InvalidAmount)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought InvalidAmount was more accurate here than InvalidReceiver

@mkurapov mkurapov merged commit c32fdde into main Sep 5, 2025
38 of 44 checks passed
@mkurapov mkurapov deleted the max/raf-1155 branch September 5, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. pkg: mock-account-service-lib pkg: mock-ase type: source Changes business logic type: tests Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants