Skip to content

Commit

Permalink
fixup! rpc: for DecodeAssetPayReq hit the oracle directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Dec 17, 2024
1 parent c5e4ef5 commit 2524248
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7750,7 +7750,9 @@ func (r *rpcServer) assetInvoiceAmt(ctx context.Context, targetAsset asset.Speci

assetRate := oracleResp.AssetRate.Rate

numAssetUnits := rfqmath.MilliSatoshiToUnits(invoiceAmt, assetRate)
numAssetUnits := rfqmath.MilliSatoshiToUnits(
invoiceAmt, assetRate,
).ScaleTo(0)

return numAssetUnits.ToUint64(), nil
}
Expand Down

0 comments on commit 2524248

Please sign in to comment.