File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -7730,6 +7730,14 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
77307730 maxUnits = assetUnits .ToUint64 ()
77317731 }
77327732
7733+ // Since we used a different oracle price query above calculate the max
7734+ // amount of units, we want to add some breathing room to account for
7735+ // price fluctuations caused by the small time delay, plus the fact that
7736+ // the agreed upon quote may be different. If we don't add this safety
7737+ // window the peer may allow a routable amount that evaluates to less
7738+ // than what we ask for.
7739+ maxUnits = (maxUnits * 105 ) / 100
7740+
77337741 resp , err := r .AddAssetBuyOrder (ctx , & rfqrpc.AddAssetBuyOrderRequest {
77347742 AssetSpecifier : & rfqrpc.AssetSpecifier {
77357743 Id : & rfqrpc.AssetSpecifier_AssetId {
You can’t perform that action at this time.
0 commit comments