@@ -31,6 +31,7 @@ import Cardano.Wasm.Internal.JavaScript.GRPC
3131 , js_submitTx
3232 )
3333import Cardano.Wasm.Internal.JavaScript.GRPCTypes (JSGRPCClient , JSUtxos )
34+ import Cardano.Wasm.NumberConversion (integerToNatural )
3435
3536import Control.Exception (evaluate )
3637import Control.Monad
@@ -446,7 +447,7 @@ makeStakeAddressRegistrationCertificate jsStakeKeyHash jsDeposit =
446447 =<< join
447448 ( Wasm. makeStakeAddressRegistrationCertificateImpl
448449 <$> fromJSVal jsStakeKeyHash
449- <*> (fromInteger <$> fromJSBigInt jsDeposit)
450+ <*> (integerToNatural =<< fromJSBigInt jsDeposit)
450451 )
451452
452453-- | Make a stake address registration certificate in the upcoming era.
@@ -456,7 +457,7 @@ makeStakeAddressRegistrationCertificateUpcomingEra jsStakeKeyHash jsDeposit =
456457 =<< join
457458 ( Wasm. makeStakeAddressRegistrationCertificateUpcomingEraImpl
458459 <$> fromJSVal jsStakeKeyHash
459- <*> (fromInteger <$> fromJSBigInt jsDeposit)
460+ <*> (integerToNatural =<< fromJSBigInt jsDeposit)
460461 )
461462
462463-- | Make a stake address unregistration certificate in the current era.
@@ -466,7 +467,7 @@ makeStakeAddressUnregistrationCertificate jsStakeKeyHash jsDeposit =
466467 =<< join
467468 ( Wasm. makeStakeAddressUnregistrationCertificateImpl
468469 <$> fromJSVal jsStakeKeyHash
469- <*> (fromInteger <$> fromJSBigInt jsDeposit)
470+ <*> (integerToNatural =<< fromJSBigInt jsDeposit)
470471 )
471472
472473-- | Make a stake address unregistration certificate in the upcoming era.
@@ -476,7 +477,7 @@ makeStakeAddressUnregistrationCertificateUpcomingEra jsStakeKeyHash jsDeposit =
476477 =<< join
477478 ( Wasm. makeStakeAddressUnregistrationCertificateUpcomingEraImpl
478479 <$> fromJSVal jsStakeKeyHash
479- <*> (fromInteger <$> fromJSBigInt jsDeposit)
480+ <*> (integerToNatural =<< fromJSBigInt jsDeposit)
480481 )
481482
482483-- | Set the transaction fee for an unsigned transaction.
0 commit comments