Skip to content

Commit

Permalink
Do not escape '/' in BitcoinUrl payment url, 1.0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Sep 19, 2014
1 parent 78135b9 commit 232dc26
Show file tree
Hide file tree
Showing 4 changed files with 273 additions and 271 deletions.
5 changes: 3 additions & 2 deletions NBitcoin.Tests/PaymentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void CanParsePaymentUrl()
Assert.Throws<FormatException>(() => new BitcoinUrlBuilder("bitcoin:129mVqKUmJ9uwPxKJBnNdABbuaaNfho4Ha?amount=50&label=Luke-Jr&message=Donation%20for%20project%20xyz&req-unknownparam=lol"));

url = new BitcoinUrlBuilder("bitcoin:mq7se9wy2egettFxPbmn99cK8v5AFq55Lx?amount=0.11&r=https://merchant.com/pay.php?h%3D2a8628fc2fbe");
Assert.Equal("bitcoin:mq7se9wy2egettFxPbmn99cK8v5AFq55Lx?amount=0.11&r=https://merchant.com/pay.php?h%3d2a8628fc2fbe", url.ToString());
Assert.Equal("https://merchant.com/pay.php?h=2a8628fc2fbe", url.PaymentRequestUrl.ToString());
Assert.Equal(url.ToString(), new BitcoinUrlBuilder(url.ToString()).ToString());

Expand Down Expand Up @@ -104,7 +105,7 @@ public void CanReadPaymentRequest()
[Trait("UnitTest", "UnitTest")]
public void CanVerifyValidChain()
{
var req =PaymentRequest.Load("data/payreq3_validchain.paymentrequest");
var req = PaymentRequest.Load("data/payreq3_validchain.paymentrequest");
Assert.True(req.VerifyChain(X509VerificationFlags.IgnoreNotTimeValid));
Assert.True(req.VerifySignature());
}
Expand Down Expand Up @@ -197,7 +198,7 @@ public void CanTalkToPaymentServer()
}
}


}

public class PaymentServerTester : IDisposable
Expand Down

0 comments on commit 232dc26

Please sign in to comment.