bcnmy / biconomy-client-sdk

Biconomy SDK is a plug & play toolkit for dApps to build transaction legos that enable a highly customised one-click experience for their users
MIT License
76 stars 78 forks source link

Refactor to paymaster url & added check for chain ids + tests #434

Closed VGabriel45 closed 8 months ago

VGabriel45 commented 8 months ago

Summary

Refactor to paymaster url & added check for chain ids + tests. This will introduce a breaking change, paymasterUrl will be used over biconomyPaymasterApiKey.

Change Type

Checklist

linear[bot] commented 8 months ago

SMA-675 Refactor biconomyPaymasterApiKey to paymasterUrl in SDK

livingrockrises commented 8 months ago

I didn't get rationale behind this change? wasn't this devx abstraction improvement?

livingrockrises commented 8 months ago

also conflicts..

joepegler commented 8 months ago

I didn't get rationale behind this change? wasn't this devx abstraction improvement?

It didn't turn out to be, we've noticed a bunch of users mistakenly assuming their paymaster api key works across different chains. It's what I would have expected too. Given that the chain comes baked into the url, this change makes it plain to devs that paymaster urls don't work cross-chain, and in this PR we now throw an error when we detect a dev attempting this.